]> granicus.if.org Git - php/commitdiff
use safe_emalloc()
authorAntony Dovgal <tony2001@php.net>
Mon, 25 Dec 2006 22:12:36 +0000 (22:12 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 25 Dec 2006 22:12:36 +0000 (22:12 +0000)
ext/standard/streamsfuncs.c

index b9694a7f2582be9afe4fc446b9bbdd7d7aef8573..af790e982335e086f37dac22cd51475b3f2ec0f3 100644 (file)
@@ -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,