summaryrefslogtreecommitdiff
path: root/libavformat/oggdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-06 17:08:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-06 18:10:47 +0200
commitc1b24ca762cba20236190cd7b24e84a9ad788bcb (patch)
treebac1c0b4c718025eebe7bb5a6278009d5e8abbcf /libavformat/oggdec.c
parent28f8114bd240712e5c2a9b52df519858fccc267c (diff)
downloadffmpeg-c1b24ca762cba20236190cd7b24e84a9ad788bcb.tar.gz
avformat/oggdec: check for av_packet_new_side_data() failure
Fixes CID1197062 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/oggdec.c')
-rw-r--r--libavformat/oggdec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index fd18e99869..b969537fb0 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;