Marcus Webster reported and fixed this read-one-byte-too-many problem...
authorDaniel Stenberg <daniel@haxx.se>
Thu, 8 Nov 2001 15:06:58 +0000 (15:06 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 8 Nov 2001 15:06:58 +0000 (15:06 +0000)
lib/formdata.c

index e0c487d..ef5e153 100644 (file)
@@ -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 */