mirror of
https://github.com/apache/httpd.git
synced 2025-07-25 17:01:22 +00:00
Sync r1895020 and r1895021 from libapreq.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895023 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -240,6 +240,8 @@ struct mfd_ctx * create_multipart_context(const char *content_type,
|
|||||||
(const char **)&ctx->bdry, &blen);
|
(const char **)&ctx->bdry, &blen);
|
||||||
if (s != APR_SUCCESS)
|
if (s != APR_SUCCESS)
|
||||||
return NULL; /* missing boundary */
|
return NULL; /* missing boundary */
|
||||||
|
if (!ctx->bdry || !*ctx->bdry)
|
||||||
|
return NULL; /* boundary with no or empty value */
|
||||||
|
|
||||||
ctx->bdry[blen] = 0;
|
ctx->bdry[blen] = 0;
|
||||||
|
|
||||||
|
@ -868,7 +868,7 @@ APREQ_DECLARE(apr_status_t)
|
|||||||
case '=':
|
case '=':
|
||||||
case ';':
|
case ';':
|
||||||
case ',':
|
case ',':
|
||||||
v = hde + 1;
|
v = hde;
|
||||||
hde -= tail;
|
hde -= tail;
|
||||||
break;
|
break;
|
||||||
case ' ':
|
case ' ':
|
||||||
@ -891,12 +891,13 @@ APREQ_DECLARE(apr_status_t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Parse the value => (*val, *vlen) */
|
/* Parse the value => (*val, *vlen) */
|
||||||
if (v[-1] == '=') {
|
if (*v == '=') {
|
||||||
if (hde == hdr) {
|
if (hde == hdr) {
|
||||||
/* The name can't be empty */
|
/* The name can't be empty */
|
||||||
return APREQ_ERROR_BADATTR;
|
return APREQ_ERROR_BADATTR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
++v;
|
||||||
while (IS_SPACE_CHAR(*v))
|
while (IS_SPACE_CHAR(*v))
|
||||||
++v;
|
++v;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user