Commit ba9a7e0d authored by Michael Niedermayer's avatar Michael Niedermayer

rtp: Fix integer underflow that could allow remote code execution.

Fixes MSVR-11-0088
Credit:  Jeong Wook Oh of Microsoft and Microsoft Vulnerability Research (MSVR)
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 3961695b
......@@ -235,6 +235,8 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf,
int prev_len = out_len;
out_len += cur_len;
asf->buf = av_realloc(asf->buf, out_len);
if(!asf->buf || FFMIN(cur_len, len - off)<0)
return -1;
memcpy(asf->buf + prev_len, buf + off,
FFMIN(cur_len, len - off));
avio_skip(pb, cur_len);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment