projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b9ab30
)
avformat/rtmppkt: Check for packet size mismatches
author
Michael Niedermayer
<michael@niedermayer.cc>
Mon, 5 Dec 2016 10:14:51 +0000
(11:14 +0100)
committer
Mike Gabriel
<sunweaver@debian.org>
Sat, 31 Aug 2019 15:36:55 +0000
(16:36 +0100)
Fixes out of array access
Found-by: Paul Cher <paulcher@icloud.com>
Reviewed-by: Paul Cher <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Gbp-Pq: Name CVE-2016-10191.patch
libavformat/rtmppkt.c
patch
|
blob
|
history
diff --git
a/libavformat/rtmppkt.c
b/libavformat/rtmppkt.c
index 37fbb5fc1699d5743276052b739df277b91e72eb..49e67dfb39352f26b6e9ed180d7489d2694fdacb 100644
(file)
--- a/
libavformat/rtmppkt.c
+++ b/
libavformat/rtmppkt.c
@@
-235,6
+235,14
@@
static int rtmp_packet_read_one_chunk(URLContext *h, RTMPPacket *p,
if (hdr != RTMP_PS_TWELVEBYTES)
timestamp += prev_pkt[channel_id].timestamp;
+ if (prev_pkt[channel_id].read && size != prev_pkt[channel_id].size) {
+ av_log(NULL, AV_LOG_ERROR, "RTMP packet size mismatch %d != %d\n",
+ size,
+ prev_pkt[channel_id].size);
+ ff_rtmp_packet_destroy(&prev_pkt[channel_id]);
+ prev_pkt[channel_id].read = 0;
+ }
+
if (!prev_pkt[channel_id].read) {
if ((ret = ff_rtmp_packet_create(p, channel_id, type, timestamp,
size)) < 0)