[php-src] PR #11925: Fix error checking in mysqlnd
| From: | kamil-tekiela | Date: | Wed, 09 Aug 2023 17:33:11 +0000 |
| Subject: | [php-src] PR #11925: Fix error checking in mysqlnd | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-23330@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/11925
Author: kamil-tekiela
The variable
bytes_sent is ssize_t while the calling applications expect
size_t. If the socket returns -1 then we overflow our unsigned return type and the
calling code doesn't know the command failed.
I don't know how to write a test case for this. This was discovered thanks to this bug #11897.
It definitely fixes a bug when a socket connection drops connection.