File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -368,9 +368,14 @@ char *sockets_strerror(int error) /* {{{ */
368368{
369369 const char * buf ;
370370
371+ ZEND_ASSERT (error > INT_MIN );
371372#ifndef PHP_WIN32
372373 if (error < -10000 ) {
373- error = - error - 10000 ;
374+ if (error == INT_MIN ) {
375+ error = 2147473648 ;
376+ } else {
377+ error = - error - 10000 ;
378+ }
374379
375380#ifdef HAVE_HSTRERROR
376381 buf = hstrerror (error );
Original file line number Diff line number Diff line change 1818}
1919?>
2020--EXPECTF--
21- socket_strerror(): Argument #1 ($error_code) must be between %s and %d
22- socket_strerror(): Argument #1 ($error_code) must be between %s and %d
21+ socket_strerror(): Argument #1 ($error_code) must be between %i and %d
22+ socket_strerror(): Argument #1 ($error_code) must be between %i and %d
You can’t perform that action at this time.
0 commit comments