Skip to content

Commit 378b307

Browse files
committed
following up.
1 parent f119df3 commit 378b307

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ext/sockets/sockets.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)