cvs: php-src(PHP_5_2) /ext/standard string.c
| From: | Ilia Alshanetsky | Date: | Mon, 08 Jan 2007 14:24:59 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/standard string.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-42609@lists.php.net to get a copy of this message | ||
iliaa Mon Jan 8 14:24:59 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard string.c
Log:
Use safe_emalloc() rather then emalloc()
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.36&r2=1.445.2.14.2.37&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.36 php-src/ext/standard/string.c:1.445.2.14.2.37
--- php-src/ext/standard/string.c:1.445.2.14.2.36 Mon Jan 1 09:36:09 2007
+++ php-src/ext/standard/string.c Mon Jan 8 14:24:59 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.445.2.14.2.36 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.37 2007/01/08 14:24:59 iliaa Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -3144,7 +3144,7 @@
}
Z_STRLEN_P(result) = len + (char_count * (to_len - 1));
- Z_STRVAL_P(result) = target = emalloc(Z_STRLEN_P(result) + 1);
+ Z_STRVAL_P(result) = target = safe_emalloc(char_count, to_len, len);
Z_TYPE_P(result) = IS_STRING;
if (case_sensitivity) {