diff mbox series

[FFmpeg-devel,1/2] avcodec/siren: Fix integer overflow in get_dw()

Message ID 20200318192044.32699-1-michael@niedermayer.cc
State Accepted
Headers show
Series [FFmpeg-devel,1/2] avcodec/siren: Fix integer overflow in get_dw()
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Michael Niedermayer March 18, 2020, 7:20 p.m. UTC
Fixes: signed integer overflow: 685813396 + 1803454769 cannot be represented in type 'int'
Fixes: 21073/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SIREN_fuzzer-5744900508483584

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/siren.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol March 18, 2020, 7:31 p.m. UTC | #1
probably ok

On 3/18/20, Michael Niedermayer <michael@niedermayer.cc> wrote:
> Fixes: signed integer overflow: 685813396 + 1803454769 cannot be represented
> in type 'int'
> Fixes:
> 21073/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SIREN_fuzzer-5744900508483584
>
> Found-by: continuous fuzzing process
> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/siren.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/siren.c b/libavcodec/siren.c
> index 76dfe62843..1c17d4505d 100644
> --- a/libavcodec/siren.c
> +++ b/libavcodec/siren.c
> @@ -363,7 +363,7 @@ typedef struct SirenContext {
>      int sample_rate_bits;
>      int region_size;
>
> -    int dw1, dw2, dw3, dw4;
> +    unsigned dw1, dw2, dw3, dw4;
>
>      int absolute_region_power_index[32];
>      float decoder_standard_deviation[32];
> --
> 2.17.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Michael Niedermayer March 19, 2020, 1:17 a.m. UTC | #2
On Wed, Mar 18, 2020 at 08:31:02PM +0100, Paul B Mahol wrote:
> probably ok

will apply

thx

[...]
diff mbox series

Patch

diff --git a/libavcodec/siren.c b/libavcodec/siren.c
index 76dfe62843..1c17d4505d 100644
--- a/libavcodec/siren.c
+++ b/libavcodec/siren.c
@@ -363,7 +363,7 @@  typedef struct SirenContext {
     int sample_rate_bits;
     int region_size;
 
-    int dw1, dw2, dw3, dw4;
+    unsigned dw1, dw2, dw3, dw4;
 
     int absolute_region_power_index[32];
     float decoder_standard_deviation[32];