Mercurial > libavformat.hg
comparison rtpdec_asf.c @ 6377:7eafa931f4e4 libavformat
Prevent overflow on random input.
author | rbultje |
---|---|
date | Fri, 13 Aug 2010 20:06:18 +0000 |
parents | 491eea5c52d6 |
children |
comparison
equal
deleted
inserted
replaced
6376:91076395b8d3 | 6377:7eafa931f4e4 |
---|---|
228 | 228 |
229 int cur_len = start_off + len_off - off; | 229 int cur_len = start_off + len_off - off; |
230 int prev_len = out_len; | 230 int prev_len = out_len; |
231 out_len += cur_len; | 231 out_len += cur_len; |
232 asf->buf = av_realloc(asf->buf, out_len); | 232 asf->buf = av_realloc(asf->buf, out_len); |
233 memcpy(asf->buf + prev_len, buf + off, cur_len); | 233 memcpy(asf->buf + prev_len, buf + off, |
234 FFMIN(cur_len, len - off)); | |
234 url_fskip(pb, cur_len); | 235 url_fskip(pb, cur_len); |
235 } | 236 } |
236 } | 237 } |
237 | 238 |
238 init_packetizer(pb, asf->buf, out_len); | 239 init_packetizer(pb, asf->buf, out_len); |