summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2000-12-08 14:28:14 +0000
committerRasmus Lerdorf <rasmus@php.net>2000-12-08 14:28:14 +0000
commitc9f1fe638d98ff67c365d886c7308f4a423ec9bc (patch)
tree3ebf546453e9dc0ddb27664027f994b787484316
parent41f3d66705de5d0e524986685b209904e6d16a48 (diff)
downloadphp-git-c9f1fe638d98ff67c365d886c7308f4a423ec9bc.tar.gz
Fix off by one error in file upload code
-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;