From a76bc3bc44e3bcd6a0923e65cd669e71e9819388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sun, 20 Jan 2013 18:31:57 +0200 Subject: rtpdec: Check the return value from av_new_packet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/rtpdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavformat/rtpdec.c') diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 4379e6f4f1..a8188878eb 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -635,7 +635,8 @@ static int rtp_parse_packet_internal(RTPDemuxContext *s, AVPacket *pkt, } else if (st) { /* At this point, the RTP header has been stripped; * This is ASSUMING that there is only 1 CSRC, which isn't wise. */ - av_new_packet(pkt, len); + if ((rv = av_new_packet(pkt, len)) < 0) + return rv; memcpy(pkt->data, buf, len); pkt->stream_index = st->index; } else { -- cgit v1.2.3