From ee884c30233856b69fb87345944b4cdfe666fc0f Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 7 Jan 2012 13:14:34 +0100 Subject: [PATCH] Fix OOM error condition in idcin demuxer. --- libavformat/idcin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/idcin.c b/libavformat/idcin.c index 878378febd..57f81c813d 100644 --- a/libavformat/idcin.c +++ b/libavformat/idcin.c @@ -266,8 +266,8 @@ static int idcin_read_packet(AVFormatContext *s, pal = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE); - if (ret < 0) - return ret; + if (!pal) + return AVERROR(ENOMEM); memcpy(pal, palette, AVPALETTE_SIZE); } pkt->stream_index = idcin->video_stream_index;