[FFmpeg-devel] [PATCH] avformat/http: Fix null check on allocated value

Himangi Saraogi himangi774 at gmail.com
Tue Mar 31 09:23:25 CEST 2015


---
This probably fixes CID 1292299 as well.

 libavformat/http.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/http.c b/libavformat/http.c
index da3c9be..45533e4 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -495,7 +495,7 @@ static int cookie_string(AVDictionary *dict, char **cookies)
     e = NULL;
     if (*cookies) av_free(*cookies);
     *cookies = av_malloc(len);
-    if (!cookies) return AVERROR(ENOMEM);
+    if (!*cookies) return AVERROR(ENOMEM);
     *cookies[0] = '\0';
 
     // write out the cookies
-- 
1.9.1



More information about the ffmpeg-devel mailing list