diff options
Diffstat (limited to 'libavutil/samplefmt.c')
-rw-r--r-- | libavutil/samplefmt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/samplefmt.c b/libavutil/samplefmt.c index 08ecc83467..a1986980f0 100644 --- a/libavutil/samplefmt.c +++ b/libavutil/samplefmt.c @@ -135,6 +135,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); } |