diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-13 01:33:35 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-13 02:09:20 +0100 |
commit | 5d8e4f6da03c0342157e6ac7fab1a8ac3a87a8b0 (patch) | |
tree | 30c22153de65b51ef970f3abc35582ab70138086 /libavformat/rtpenc.c | |
parent | c5f15f40b9b25f033fd9e8dd1e12763913098c11 (diff) | |
download | ffmpeg-5d8e4f6da03c0342157e6ac7fab1a8ac3a87a8b0.tar.gz |
avformat/rtpenc: check av_packet_get_side_data() return, fix null ptr dereference
Fixes CID1035715
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r-- | libavformat/rtpenc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index 6fdc908d0f..f0100083b8 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -557,6 +557,10 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt) const uint8_t *mb_info = av_packet_get_side_data(pkt, AV_PKT_DATA_H263_MB_INFO, &mb_info_size); + if (!mb_info) { + av_log(s1, AV_LOG_ERROR, "failed to allocate side data\n"); + return AVERROR(ENOMEM); + } ff_rtp_send_h263_rfc2190(s1, pkt->data, size, mb_info, mb_info_size); break; } |