mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
Merge commit '0e830094ad0dc251613a0aa3234d9c5c397e02e6'
* commit '0e830094ad0dc251613a0aa3234d9c5c397e02e6': samplefmt: avoid integer overflow in av_samples_get_buffer_size() Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
d80b9ea11d
@ -135,6 +135,8 @@ int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
|
|||||||
|
|
||||||
/* auto-select alignment if not specified */
|
/* auto-select alignment if not specified */
|
||||||
if (!align) {
|
if (!align) {
|
||||||
|
if (nb_samples > INT_MAX - 31)
|
||||||
|
return AVERROR(EINVAL);
|
||||||
align = 1;
|
align = 1;
|
||||||
nb_samples = FFALIGN(nb_samples, 32);
|
nb_samples = FFALIGN(nb_samples, 32);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user