cvs: php4 /main rfc1867.c
| From: | Rasmus Lerdorf | Date: | Fri, 08 Dec 2000 14:28:14 +0000 |
| Subject: | cvs: php4 /main rfc1867.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-3033@lists.php.net to get a copy of this message | ||
rasmus Fri Dec 8 06:28:14 2000 EDT
Modified files:
/php4/main rfc1867.c
Log:
Fix off by one error in file upload code
Index: php4/main/rfc1867.c
diff -u php4/main/rfc1867.c:1.54 php4/main/rfc1867.c:1.55
--- php4/main/rfc1867.c:1.54 Mon Oct 30 07:30:27 2000
+++ php4/main/rfc1867.c Fri Dec 8 06:28:14 2000
@@ -15,7 +15,7 @@
| Authors: Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: rfc1867.c,v 1.54 2000/10/30 15:30:27 stas Exp $ */
+/* $Id: rfc1867.c,v 1.55 2000/12/08 14:28:14 rasmus Exp $ */
#include <stdio.h>
#include "php.h"
@@ -182,7 +182,7 @@
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;