From 59d4dfc4c603ad3939911325b18f752caa407ce5 Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Wed, 9 May 2001 04:54:46 +0000 Subject: [PATCH] fix crash bug (unlikely, but this is the only place where the reported bug would make sense, and it can't hurt)... --- ext/sockets/sockets.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index ea784729e8..67666e523e 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -1093,6 +1093,10 @@ PHP_FUNCTION(strerror) } else { buf = strerror(-(Z_LVAL_PP(error))); } + + if (!buf) { + RETURN_FALSE; + } RETURN_STRING((char *)buf, 1); } -- 2.50.1