]> granicus.if.org Git - curl/commitdiff
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 e0c487dc67bddbeae8b95e855d21175709e2db75..ef5e153748d0eac39b4cfe701092d302134f148e 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 */