mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
Prevent overflow on random input.
Originally committed as revision 24795 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
67197656d1
commit
afbc4d2dac
1 changed files with 2 additions and 1 deletions
|
|
@ -230,7 +230,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);
|
||||
memcpy(asf->buf + prev_len, buf + off, cur_len);
|
||||
memcpy(asf->buf + prev_len, buf + off,
|
||||
FFMIN(cur_len, len - off));
|
||||
url_fskip(pb, cur_len);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue