1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

http: Set http_code to 200 when doing a POST

This avoids reading and comparing uninitialized memory.

Originally committed as revision 23464 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Martin Storsjö 2010-06-04 06:35:12 +00:00
parent 413abbe164
commit dd798dcd11

View File

@ -291,6 +291,10 @@ static int http_connect(URLContext *h, const char *path, const char *hoststr,
if (post) { if (post) {
/* always use chunked encoding for upload data */ /* always use chunked encoding for upload data */
s->chunksize = 0; s->chunksize = 0;
/* Pretend that it did work. We didn't read any header yet, since
* we've still to send the POST data, but the code calling this
* function will check http_code after we return. */
s->http_code = 200;
return 0; return 0;
} }