mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Marcus Webster reported and fixed this read-one-byte-too-many problem...
This commit is contained in:
parent
6ebac3dc76
commit
0ffec712e1
@ -923,7 +923,7 @@ static int AddFormData(struct FormData **formp,
|
|||||||
length = strlen((char *)line);
|
length = strlen((char *)line);
|
||||||
|
|
||||||
newform->line = (char *)malloc(length+1);
|
newform->line = (char *)malloc(length+1);
|
||||||
memcpy(newform->line, line, length+1);
|
memcpy(newform->line, line, length);
|
||||||
newform->length = length;
|
newform->length = length;
|
||||||
newform->line[length]=0; /* zero terminate for easier debugging */
|
newform->line[length]=0; /* zero terminate for easier debugging */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user