From 0ffec712e1b6479ff236d387c3d6b17d66f61881 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 8 Nov 2001 15:06:58 +0000 Subject: [PATCH] Marcus Webster reported and fixed this read-one-byte-too-many problem... --- lib/formdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/formdata.c b/lib/formdata.c index e0c487dc6..ef5e15374 100644 --- a/lib/formdata.c +++ b/lib/formdata.c @@ -923,7 +923,7 @@ static int AddFormData(struct FormData **formp, length = strlen((char *)line); newform->line = (char *)malloc(length+1); - memcpy(newform->line, line, length+1); + memcpy(newform->line, line, length); newform->length = length; newform->line[length]=0; /* zero terminate for easier debugging */