mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
make the contents able to be any data, the previous stopped at white space
This commit is contained in:
parent
1756499b11
commit
19f5aa165c
11
src/main.c
11
src/main.c
@ -762,13 +762,12 @@ static int formparse(char *input,
|
||||
char *sep;
|
||||
char *sep2;
|
||||
|
||||
/* Preallocate contents to the length of input to make sure we don't
|
||||
overwrite anything. */
|
||||
contents = malloc(strlen(input));
|
||||
contents[0] = '\000';
|
||||
|
||||
if(1 <= sscanf(input, "%255[^=]=%s", name, contents)) {
|
||||
if((1 == sscanf(input, "%255[^=]=", name)) &&
|
||||
(contp = strchr(input, '='))) {
|
||||
/* the input was using the correct format */
|
||||
|
||||
/* Allocate the contents */
|
||||
contents = strdup(contp+1);
|
||||
contp = contents;
|
||||
|
||||
if('@' == contp[0]) {
|
||||
|
Loading…
Reference in New Issue
Block a user