summaryrefslogtreecommitdiff
path: root/main/rfc1867.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/rfc1867.c')
-rw-r--r--main/rfc1867.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/rfc1867.c b/main/rfc1867.c
index 8c84c80010..40567f3507 100644
--- a/main/rfc1867.c
+++ b/main/rfc1867.c
@@ -182,7 +182,7 @@ static void php_mime_split(char *buf, int cnt, char *boundary, zval *array_ptr S
if (lbuf) {
efree(lbuf);
}
- lbuf = emalloc(s-name + MAX_SIZE_OF_INDEX);
+ lbuf = emalloc(s-name + MAX_SIZE_OF_INDEX + 1);
state = 2;
loc2 = memchr(loc + 1, '\n', rem);
rem -= (loc2 - ptr) + 1;