Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-06-04 10:35:12 +0400
committerMartin Storsjö <martin@martin.st>2010-06-04 10:35:12 +0400
commitdd798dcd11d5ddf0cad0e44bdcd7bc3e90b3bbe8 (patch)
treeeb512f718d5c340eb6415865a9993736c02b17bc /libavformat/http.c
parent413abbe16465a7b49472ac110e42939e853e24a1 (diff)
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
Diffstat (limited to 'libavformat/http.c')
-rw-r--r--libavformat/http.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index 56f8021025..4e2152f5ef 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -291,6 +291,10 @@ static int http_connect(URLContext *h, const char *path, const char *hoststr,
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;
}