1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

af_asyncts: avoid overflow in out_size with large delta values

This commit is contained in:
Justin Ruggles 2012-07-28 13:12:38 -04:00
parent 70d71b5801
commit be51e589cd

View File

@ -186,7 +186,7 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
if (labs(delta) > s->min_delta) {
av_log(ctx, AV_LOG_VERBOSE, "Discontinuity - %"PRId64" samples.\n", delta);
out_size += delta;
out_size = av_clipl_int32((int64_t)out_size + delta);
} else {
if (s->resample) {
int comp = av_clip(delta, -s->max_comp, s->max_comp);