php/php-5.2.1-strreplace.patch
jorton bcfa43c427 * Thu Feb 15 2007 Joe Orton <jorton@redhat.com> 5.2.1-2
- update to 5.2.1
- fix regression in str_{i,}replace (from upstream)
- add Requires(pre) for httpd
- trim %changelog to versions >= 5.0.0
2007-02-16 12:50:13 +00:00

12 lines
376 B
Diff

--- php-5.2.1/ext/standard/string.c.strreplace
+++ php-5.2.1/ext/standard/string.c
@@ -3148,7 +3148,7 @@
}
Z_STRLEN_P(result) = len + (char_count * (to_len - 1));
- Z_STRVAL_P(result) = target = safe_emalloc(char_count, to_len, len);
+ Z_STRVAL_P(result) = target = safe_emalloc(char_count, to_len, len + 1);
Z_TYPE_P(result) = IS_STRING;
if (case_sensitivity) {