Allow for leading whitespace in parameters when looking for the boundary.

svn path=/trunk/; revision=22246
This commit is contained in:
Graeme Lunt 2007-07-05 16:19:36 +00:00
parent 9f5e016fff
commit ce458040ac
1 changed files with 6 additions and 3 deletions

View File

@ -328,7 +328,11 @@ get_multipart_info(packet_info *pinfo)
* The parameters must contain the boundary string
*/
p = parameters;
while (*p) {
while (*p) {
while ((*p) && isspace((guchar)*p))
p++; /* Skip white space */
if (strncasecmp(p, "boundary=", 9) == 0)
break;
/* Skip to next parameter */
@ -339,8 +343,7 @@ get_multipart_info(packet_info *pinfo)
return NULL;
}
p++; /* Skip semicolon */
while ((*p) && isspace((guchar)*p))
p++; /* Skip white space */
}
start = p + 9;
if (start[0] == 0) {