svn: /php/php-src/trunk/ext/standard/ string.c
| From: | Kalle Sommer Nielsen | Date: | Tue, 24 Nov 2009 11:08:16 +0000 |
| Subject: | svn: /php/php-src/trunk/ext/standard/ string.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-60992@lists.php.net to get a copy of this message | ||
kalle Tue, 24 Nov 2009 11:08:16 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=291259
Log:
Fixed #50226 (Insufficient memory allocation for unicode string)
- Patch by yoarvi at gmail dot com
Bug: http://bugs.php.net/50226 (Open) [PATCH] - Insufficient
memory allocation for unicode string
Changed paths:
U php/php-src/trunk/ext/standard/string.c
Modified: php/php-src/trunk/ext/standard/string.c
===================================================================
--- php/php-src/trunk/ext/standard/string.c 2009-11-24 11:02:47 UTC (rev 291258)
+++ php/php-src/trunk/ext/standard/string.c 2009-11-24 11:08:16 UTC (rev 291259)
@@ -3457,7 +3457,7 @@
if (type == IS_UNICODE) {
old_end.u = old.u + old_len;
- str.u = safe_emalloc(2, UBYTES(old_len), 1);
+ str.u = safe_emalloc(2, UBYTES(old_len), UBYTES(1));
for (p.u = old.u, q.u = str.u; p.u != old_end.u; p.u++) {
cp = *p.u;