diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-01 13:24:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-01 13:24:57 +0200 |
commit | 2ee58af53e1cb788f9b8d50530ec1f5f73c431b6 (patch) | |
tree | e48e934ea23507d907e7bef90c27ee80da1d19f2 /libavformat/rtpproto.c | |
parent | 4f07fcd30b0e910d11e08172549a301beffd7e3a (diff) | |
parent | 1851e1d05d06f6ef3436c667e4354da0f407b226 (diff) | |
download | ffmpeg-2ee58af53e1cb788f9b8d50530ec1f5f73c431b6.tar.gz |
Merge commit '1851e1d05d06f6ef3436c667e4354da0f407b226'
* commit '1851e1d05d06f6ef3436c667e4354da0f407b226':
rtpproto: Check the size before reading buf[1]
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpproto.c')
-rw-r--r-- | libavformat/rtpproto.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index b109ac8402..ba699b5708 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -369,6 +369,9 @@ static int rtp_write(URLContext *h, const uint8_t *buf, int size) int ret; URLContext *hd; + if (size < 2) + return AVERROR(EINVAL); + if (RTP_PT_IS_RTCP(buf[1])) { /* RTCP payload type */ hd = s->rtcp_hd; |