Browse Source

avformat/oggdec: check for av_packet_new_side_data() failure

Fixes CID1197062
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 11 years ago
parent
commit
c1b24ca762
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavformat/oggdec.c

+ 5
- 0
libavformat/oggdec.c View File

@@ -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;


Loading…
Cancel
Save