Message ID | 20220917143209.7797-2-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 9303ba272e988d87084880c57056b750cc5ffd08 |
Headers | show |
Series | [FFmpeg-devel,1/2] avformat/aiffdec: Check block_duration | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On 9/17/22, Michael Niedermayer <michael@niedermayer.cc> wrote: > Fixes: signed integer overflow: 3 * -2147483648 cannot be represented in > type 'int' > Fixes: > 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6668935979728896 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavformat/aiffdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c > index 318e3ad742e..80733e58010 100644 > --- a/libavformat/aiffdec.c > +++ b/libavformat/aiffdec.c > @@ -428,7 +428,7 @@ static int aiff_read_packet(AVFormatContext *s, > pkt->flags &= ~AV_PKT_FLAG_CORRUPT; > /* Only one stream in an AIFF file */ > pkt->stream_index = 0; > - pkt->duration = (res / st->codecpar->block_align) * > aiff->block_duration; > + pkt->duration = (res / st->codecpar->block_align) * (int64_t) > aiff->block_duration; > return 0; > } LGTM > > -- > 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". >
On Sat, Sep 17, 2022 at 04:45:28PM +0200, Paul B Mahol wrote: > On 9/17/22, Michael Niedermayer <michael@niedermayer.cc> wrote: > > Fixes: signed integer overflow: 3 * -2147483648 cannot be represented in > > type 'int' > > Fixes: > > 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6668935979728896 > > > > Found-by: continuous fuzzing process > > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > > --- > > libavformat/aiffdec.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c > > index 318e3ad742e..80733e58010 100644 > > --- a/libavformat/aiffdec.c > > +++ b/libavformat/aiffdec.c > > @@ -428,7 +428,7 @@ static int aiff_read_packet(AVFormatContext *s, > > pkt->flags &= ~AV_PKT_FLAG_CORRUPT; > > /* Only one stream in an AIFF file */ > > pkt->stream_index = 0; > > - pkt->duration = (res / st->codecpar->block_align) * > > aiff->block_duration; > > + pkt->duration = (res / st->codecpar->block_align) * (int64_t) > > aiff->block_duration; > > return 0; > > } > > LGTM will apply thx [...]
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 318e3ad742e..80733e58010 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -428,7 +428,7 @@ static int aiff_read_packet(AVFormatContext *s, pkt->flags &= ~AV_PKT_FLAG_CORRUPT; /* Only one stream in an AIFF file */ pkt->stream_index = 0; - pkt->duration = (res / st->codecpar->block_align) * aiff->block_duration; + pkt->duration = (res / st->codecpar->block_align) * (int64_t) aiff->block_duration; return 0; }
Fixes: signed integer overflow: 3 * -2147483648 cannot be represented in type 'int' Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6668935979728896 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/aiffdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)