[FFmpeg-cvslog] avformat/oggdec: check for av_packet_new_side_data() failure
Michael Niedermayer
git at videolan.org
Sun Apr 6 18:24:45 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 6 17:08:19 2014 +0200| [c1b24ca762cba20236190cd7b24e84a9ad788bcb] | committer: Michael Niedermayer
avformat/oggdec: check for av_packet_new_side_data() failure
Fixes CID1197062
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c1b24ca762cba20236190cd7b24e84a9ad788bcb
---
libavformat/oggdec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index fd18e99..b969537 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -806,6 +806,11 @@ retry:
uint8_t *side_data = av_packet_new_side_data(pkt,
AV_PKT_DATA_METADATA_UPDATE,
os->new_metadata_size);
+ if(side_data == NULL) {
+ av_free_packet(pkt);
+ av_free(pkt);
+ return AVERROR(ENOMEM);
+ }
memcpy(side_data, os->new_metadata, os->new_metadata_size);
av_freep(&os->new_metadata);
os->new_metadata_size = 0;
More information about the ffmpeg-cvslog
mailing list