summaryrefslogtreecommitdiff
path: root/ext/standard/php_smart_str.h
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2014-04-24 10:18:39 +0800
committerXinchen Hui <laruence@gmail.com>2014-04-24 10:18:39 +0800
commit9824418c61974e4d8bef372da91e64deadbfdd9b (patch)
tree0785d4611634759ce6ff53287f52f9df8dbe51c3 /ext/standard/php_smart_str.h
parenta30442c1c8cbd718ffb83911fac87ed099b25508 (diff)
parentd2e45b05c7734181ece641d8cb20f165c3122ddc (diff)
downloadphp-git-9824418c61974e4d8bef372da91e64deadbfdd9b.tar.gz
Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2
Diffstat (limited to 'ext/standard/php_smart_str.h')
-rw-r--r--ext/standard/php_smart_str.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/php_smart_str.h b/ext/standard/php_smart_str.h
index a518fbfddf..5cc3a62137 100644
--- a/ext/standard/php_smart_str.h
+++ b/ext/standard/php_smart_str.h
@@ -45,11 +45,11 @@
#ifdef SMART_STR_USE_REALLOC
#define SMART_STR_DO_REALLOC(b, w) do { \
- (b)->s = erealloc((buf)->s, sizeof(zend_string) + (b)->a); \
+ (b)->s = erealloc((buf)->s, _STR_HEADER_SIZE + (b)->a + 1); \
} while (0)
#else
#define SMART_STR_DO_REALLOC(b, w) do { \
- (b)->s = perealloc((b)->s, sizeof(zend_string) + (b)->a, (w)); \
+ (b)->s = perealloc((b)->s, _STR_HEADER_SIZE + (b)->a + 1, (w)); \
} while (0)
#endif