]> granicus.if.org Git - php/commitdiff
Fix off by one error in file upload code
authorRasmus Lerdorf <rasmus@php.net>
Fri, 8 Dec 2000 14:28:14 +0000 (14:28 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Fri, 8 Dec 2000 14:28:14 +0000 (14:28 +0000)
main/rfc1867.c

index 8c84c800103a154796a9227be7e4800bb3044db1..40567f3507545919deb5f749d1961986b0c48062 100644 (file)
@@ -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;