From: Antony Dovgal Date: Mon, 25 Dec 2006 22:12:36 +0000 (+0000) Subject: use safe_emalloc() X-Git-Tag: RELEASE_1_0_0RC1~501 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df52817f48eef1779f340a3cc7651915e4174632;p=php use safe_emalloc() --- diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index b9694a7f25..af790e9823 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -369,7 +369,7 @@ PHP_FUNCTION(stream_socket_recvfrom) RETURN_FALSE; } - read_buf = emalloc(to_read + 1); + read_buf = safe_emalloc(1, to_read, 1); recvd = php_stream_xport_recvfrom(stream, read_buf, to_read, flags, NULL, NULL, zremote ? &remote_addr : NULL,