diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-10-08 12:50:42 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-10-08 13:00:45 +0200 |
commit | 9885c9508ec757f7f658dab11658e4a3e643a420 (patch) | |
tree | 35af961981ab069167b9d9285a5da3fa10bac7d9 /lib/formdata.h | |
parent | f74baaf3b3c8a4297d40322bf0ea9a6e136a3a73 (diff) | |
download | curl-9885c9508ec757f7f658dab11658e4a3e643a420.tar.gz |
formpost: avoid silent snprintf() truncation
The previous use of snprintf() could make libcurl silently truncate some
input data and not report that back on overly large input, which could
make data get sent over the network in a bad format.
Example:
$ curl --form 'a=b' -H "Content-Type: $(perl -e 'print "A"x4100')"
Diffstat (limited to 'lib/formdata.h')
-rw-r--r-- | lib/formdata.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/formdata.h b/lib/formdata.h index 6eb7c6c9e..200470b50 100644 --- a/lib/formdata.h +++ b/lib/formdata.h @@ -23,6 +23,7 @@ ***************************************************************************/ enum formtype { + FORM_DATAMEM, /* already allocated FORM_DATA memory */ FORM_DATA, /* form metadata (convert to network encoding if necessary) */ FORM_CONTENT, /* form content (never convert) */ FORM_CALLBACK, /* 'line' points to the custom pointer we pass to the callback |