Commit 0e830094 authored by Justin Ruggles's avatar Justin Ruggles

samplefmt: avoid integer overflow in av_samples_get_buffer_size()

CC:libav-stable@libav.org
parent 190d4a44
......@@ -118,6 +118,8 @@ int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
/* auto-select alignment if not specified */
if (!align) {
if (nb_samples > INT_MAX - 31)
return AVERROR(EINVAL);
align = 1;
nb_samples = FFALIGN(nb_samples, 32);
}
......
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