[FFmpeg-cvslog] r23464 - trunk/libavformat/http.c

mstorsjo subversion
Fri Jun 4 08:35:12 CEST 2010


Author: mstorsjo
Date: Fri Jun  4 08:35:12 2010
New Revision: 23464

Log:
http: Set http_code to 200 when doing a POST

This avoids reading and comparing uninitialized memory.

Modified:
   trunk/libavformat/http.c

Modified: trunk/libavformat/http.c
==============================================================================
--- trunk/libavformat/http.c	Fri Jun  4 06:46:26 2010	(r23463)
+++ trunk/libavformat/http.c	Fri Jun  4 08:35:12 2010	(r23464)
@@ -291,6 +291,10 @@ static int http_connect(URLContext *h, c
     if (post) {
         /* always use chunked encoding for upload data */
         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;
     }
 



More information about the ffmpeg-cvslog mailing list