From 6c22f90b4a3d24a8da83e78f8eef97cba6c05197 Mon Sep 17 00:00:00 2001 From: Dan Kalowsky Date: Fri, 16 Aug 2002 19:34:43 +0000 Subject: [PATCH] Fix for bug #18792 submitted by t.bubeck@reinform.de # talked this over with sterling and he believes it shouldn't break anything # although there might be a need/desire to check for both ',' and ';' --- main/rfc1867.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main/rfc1867.c b/main/rfc1867.c index dd0651abc5..83d981bf2d 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -617,7 +617,7 @@ static char *multipart_buffer_read_body(multipart_buffer *self TSRMLS_DC) SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) { - char *boundary, *s=NULL, *start_arr=NULL, *array_index=NULL; + char *boundary, *s=NULL, *boundary_end = NULL, *start_arr=NULL, *array_index=NULL; char *temp_filename=NULL, *lbuf=NULL, *abuf=NULL; int boundary_len=0, total_bytes=0, cancel_upload=0, is_arr_upload=0, array_len=0, max_file_size=0; zval *http_post_files=NULL; @@ -638,6 +638,11 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) sapi_module.sapi_error(E_WARNING, "Missing boundary in multipart/form-data POST data"); return; } + + /* search for the end of the boundary */ + boundary_end = strchr(boundary, ','); + if (boundary_end ) *boundary_end = 0; + boundary++; boundary_len = strlen(boundary); -- 2.50.1