-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
Description
To reproduce: Run curl -F 'field=<-' 'http://example.com/'
, then type "abc\n" and press ^D; curl will continue waiting for input until you press ^D a second time.
The bug is caused by the use of fread()
in Curl_getformdata()
(code at the time of writing). In the example above, fread()
will return 4 after the first call, even at EOF. To handle EOF correctly, the code should check feof()
explicitly.