fix missing parentheses in filename* parsing

This commit is contained in:
martinhsv
2021-05-11 13:46:50 -07:00
parent 7fccb0d225
commit 65e7e474b1
2 changed files with 55 additions and 7 deletions

View File

@@ -341,7 +341,7 @@ int Multipart::parse_content_disposition(const char *c_d_value, int offset) {
const char* start_of_filename = p;
while ((*p != '\0') && (*p != ';')) {
if (*p == '%') {
if ((*(p+1) == '\0') || (!isxdigit(*(p+1))) || (!isxdigit(*p+2))) {
if ((*(p+1) == '\0') || (!isxdigit(*(p+1))) || (!isxdigit(*(p+2)))) {
return -18;
}
p += 3;