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

Himangi Saraogi git at videolan.org
Tue Mar 31 12:45:40 CEST 2015


ffmpeg | branch: master | Himangi Saraogi <himangi774 at gmail.com> | Tue Mar 31 13:11:25 2015 +0530| [919d13d2383bd7318b80ed0c5b723323a79a8996] | committer: Michael Niedermayer

avformat/http: Fix null check on allocated value

probably fixes CID 1292299

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=919d13d2383bd7318b80ed0c5b723323a79a8996
---

 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



More information about the ffmpeg-cvslog mailing list