PHP 4.0 Bug #7037: patch for main/rfc1867.c (OpenBSD & SuSE)
| From: | swenson at heronetwork dot com | Date: | Thu, 05 Oct 2000 09:27:05 +0000 |
| Subject: | PHP 4.0 Bug #7037: patch for main/rfc1867.c (OpenBSD & SuSE) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-34265@lists.php.net to get a copy of this message | ||
From: swenson@heronetwork.com
Operating system: OpenBSD & SuSE
PHP version: 4.0 Latest CVS (05/10/2000)
PHP Bug Type: *Install and Config
Bug description: patch for main/rfc1867.c (OpenBSD & SuSE)
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;
}