diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2017-07-20 21:14:01 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2017-07-20 21:41:52 +0200 |
commit | a319063aaeaad817cd777a373c5b8ac6a26950d1 (patch) | |
tree | 73a2d4331c57beef24abfaff5fd9e0e588bc0e30 /ext/mbstring/libmbfl/mbfl | |
parent | 1388751f10799a240fa4cd62285c3b5c7acb235b (diff) | |
download | php-git-a319063aaeaad817cd777a373c5b8ac6a26950d1.tar.gz |
Only write single terminating byte
As far as I could determine this is sufficient. It avoids
reallocating the buffer, if it was perfectly allocated beforehand.
Diffstat (limited to 'ext/mbstring/libmbfl/mbfl')
-rw-r--r-- | ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c b/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c index 5a28613014..176a752288 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_memory_device.c @@ -119,7 +119,7 @@ mbfl_memory_device_result(mbfl_memory_device *device, mbfl_string *result) { if (device && result) { result->len = device->pos; - mbfl_memory_device_output4('\0', device); + mbfl_memory_device_output('\0', device); result->val = device->buffer; device->buffer = (unsigned char *)0; device->length = 0; |