PHP 4.0 Bug #7037 Updated: patch for main/rfc1867.c (OpenBSD & SuSE)
| From: | stas@php.net | Date: | Mon, 30 Oct 2000 16:05:06 +0000 |
| Subject: | PHP 4.0 Bug #7037 Updated: patch for main/rfc1867.c (OpenBSD & SuSE) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-36430@lists.php.net to get a copy of this message | ||
ID: 7037
Updated by: stas
Reported By: swenson@heronetwork.com
Status: Feedback
Bug Type: *Install and Config
Assigned To:
Comments:
I don't see a purpose of this patch. Could you please explain?
Previous Comments:
---------------------------------------------------------------------------
[2000-10-05 05:27:05] swenson@heronetwork.com
Just got latest CVS tarball installed on my two servers. I do not know if you have this patch from
the OpenBSD group or not. I can not find a related bug. So I am letting you know that it was needed.
--- main/rfc1867.c:1.38 Sat Aug 5 23:40:28 2000
+++ main/rfc1867.c Sun Sep 3 22:09:46 2000
@@ -112,7 +112,7 @@
int eolsize;
long bytes, max_file_size = 0;
char *namebuf=NULL, *filenamebuf=NULL, *lbuf=NULL,
- *abuf=NULL, *start_arr=NULL, *end_arr=NULL, *arr_index=NULL;
+ *abuf=NULL, *start_arr=NULL, *end_arr=NULL, *arr_index=NULL, *sbuf=NULL;
FILE *fp;
int itype, is_arr_upload=0, arr_len=0;
zval *http_post_files=NULL;
@@ -223,8 +223,10 @@
}
abuf = estrndup(namebuf, strlen(namebuf)-arr_len);
sprintf(lbuf, "%s_name[%s]", abuf,
arr_index);
+ sbuf = estrdup(abuf);
} else {
sprintf(lbuf, "%s_name", namebuf);
+ sbuf = estrdup(abuf);
}
s = strrchr(filenamebuf, '\');
if (s && s > filenamebuf) {
@@ -418,6 +418,7 @@
break;
}
}
+ if(sbuf) efree(sbuf);
SAFE_RETURN;
}
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7037