mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
ext/sockets: socket_strerror follow-up on GH-16267 fix.
boundaries should be INT_MIN <= val < INT_MAX in fact. close GH-16891
This commit is contained in:
parent
3702f9783b
commit
3bea6a2ddb
3 changed files with 14 additions and 10 deletions
|
@ -354,7 +354,11 @@ char *sockets_strerror(int error) /* {{{ */
|
|||
|
||||
#ifndef PHP_WIN32
|
||||
if (error < -10000) {
|
||||
error = -error - 10000;
|
||||
if (error == INT_MIN) {
|
||||
error = 2147473648;
|
||||
} else {
|
||||
error = -error - 10000;
|
||||
}
|
||||
|
||||
#ifdef HAVE_HSTRERROR
|
||||
buf = hstrerror(error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue