Skip to content

Commit 530de64

Browse files
author
foobar
committed
MFH
1 parent 66950f9 commit 530de64

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

main/rfc1867.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ static void php_mime_split(char *buf, int cnt, char *boundary, zval *array_ptr S
220220
php_error(E_WARNING, "File upload error - no name component in content disposition");
221221
SAFE_RETURN;
222222
}
223-
filename = strstr(s, " filename=\"");
223+
filename = strstr(s, "filename=\"");
224224
if (filename && filename < loc) {
225-
filename += 11;
225+
filename += 10;
226226
s = memchr(filename, '\"', loc - filename);
227227
if (!s) {
228228
php_error(E_WARNING, "File Upload Mime headers garbled filename: [%c%c%c%c%c]", *filename, *(filename + 1), *(filename + 2), *(filename + 3), *(filename + 4));
@@ -251,11 +251,11 @@ static void php_mime_split(char *buf, int cnt, char *boundary, zval *array_ptr S
251251
}
252252

253253
/* Add $foo[name] */
254-
if (is_arr_upload) {
255-
sprintf(lbuf, "%s[name][%s]", abuf, arr_index);
256-
} else {
257-
sprintf(lbuf, "%s[name]", namebuf);
258-
}
254+
if (is_arr_upload) {
255+
sprintf(lbuf, "%s[name][%s]", abuf, arr_index);
256+
} else {
257+
sprintf(lbuf, "%s[name]", namebuf);
258+
}
259259
if (s && s > filenamebuf) {
260260
register_http_post_files_variable(lbuf, s+1, http_post_files, 0 ELS_CC PLS_CC);
261261
} else {

0 commit comments

Comments
 (0)