ffmpeg | branch: master | Steven Liu <[email protected]> | Thu Oct 10 
10:34:38 2019 +0800| [25f5d67a316b6868b4358e0b908bc19f00b9d357] | committer: 
Steven Liu

avformat/cinedec: check av_strdup() return value

Signed-off-by: Steven Liu <[email protected]>

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

 libavformat/cinedec.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c
index d27ebbba7b..0f2453cdf5 100644
--- a/libavformat/cinedec.c
+++ b/libavformat/cinedec.c
@@ -168,6 +168,10 @@ static int cine_read_header(AVFormatContext *avctx)
     avio_skip(pb, 616); // Binning .. bFlipH
     if (!avio_rl32(pb) ^ vflip) {
         st->codecpar->extradata  = av_strdup("BottomUp");
+        if (!st->codecpar->extradata) {
+            st->codecpar->extradata_size = 0;
+            return AVERROR(ENOMEM);
+        }
         st->codecpar->extradata_size  = 9;
     }
 

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to