mirror of
https://github.com/curl/curl.git
synced 2026-08-25 09:53:32 +03:00
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')"
This commit is contained in:
parent
f74baaf3b3
commit
9885c9508e
2 changed files with 26 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue