1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

prevent a single byte read outside the string in test case 39

This commit is contained in:
Daniel Stenberg 2005-01-06 22:54:37 +00:00
parent 52e1ce9518
commit a137223b4f

View File

@ -863,7 +863,6 @@ static int formparse(char *input,
ptr++;
if(curlx_strnequal("type=", ptr, 5)) {
/* set type pointer */
type = &ptr[5];
@ -878,9 +877,13 @@ static int formparse(char *input,
/* now point beyond the content-type specifier */
sep = (char *)type + strlen(major)+strlen(minor)+1;
*sep=0; /* zero terminate type string */
if(*sep) {
*sep=0; /* zero terminate type string */
ptr=sep+1;
ptr=sep+1;
}
else
ptr = NULL; /* end */
}
else if(curlx_strnequal("filename=", ptr, 9)) {
filename = &ptr[9];