]> granicus.if.org Git - php/commitdiff
use safe_emalloc
authorStanislav Malyshev <stas@php.net>
Mon, 5 Mar 2007 21:54:46 +0000 (21:54 +0000)
committerStanislav Malyshev <stas@php.net>
Mon, 5 Mar 2007 21:54:46 +0000 (21:54 +0000)
ext/fdf/fdf.c

index 39fdea2f92a07001e4fa791b02b2d065074b0205..92b88f1690f1b5c9df4b656173b619759bf73a0d 100644 (file)
@@ -1105,7 +1105,7 @@ PHP_FUNCTION(fdf_save_string)
                                        RETVAL_FALSE;
                                        goto err;
                                }
-                               buf = emalloc(stat.st_size +1);
+                               buf = safe_emalloc(1, stat.st_size, 1);
                                fread(buf, stat.st_size, 1, fp);
                                buf[stat.st_size] = '\0';
                                fclose(fp);