* [FFmpeg-devel] [PATCH 1/5] avcodec/vp9_superframe_bsf: Check in size
@ 2022-03-21 20:19 Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs Michael Niedermayer
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Michael Niedermayer @ 2022-03-21 20:19 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: Out of array read
Fixes: 45722/clusterfuzz-testcase-minimized-ffmpeg_BSF_VP9_SUPERFRAME_fuzzer-5173378975137792
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/vp9_superframe_bsf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c
index 57681e29e4..bed9fd4ba2 100644
--- a/libavcodec/vp9_superframe_bsf.c
+++ b/libavcodec/vp9_superframe_bsf.c
@@ -108,7 +108,7 @@ static int vp9_superframe_filter(AVBSFContext *ctx, AVPacket *pkt)
if (res < 0)
return res;
- marker = pkt->data[pkt->size - 1];
+ marker = pkt->size ? pkt->data[pkt->size - 1] : 0;
if ((marker & 0xe0) == 0xc0) {
int nbytes = 1 + ((marker >> 3) & 0x3);
int n_frames = 1 + (marker & 0x7), idx_sz = 2 + n_frames * nbytes;
--
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".
^ permalink raw reply [flat|nested] 13+ messages in thread
* [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs
2022-03-21 20:19 [FFmpeg-devel] [PATCH 1/5] avcodec/vp9_superframe_bsf: Check in size Michael Niedermayer
@ 2022-03-21 20:19 ` Michael Niedermayer
2022-03-21 20:33 ` James Almer
2022-03-21 20:48 ` Andreas Rheinhardt
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 3/5] avcodec/vmdaudio: Fix channels count bug Michael Niedermayer
` (2 subsequent siblings)
3 siblings, 2 replies; 13+ messages in thread
From: Michael Niedermayer @ 2022-03-21 20:19 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: member access within null pointer of type 'const FFCodec' (aka 'const struct FFCodec')
Fixes: 45726/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6554445419249664
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/allcodecs.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index b1aa7e266b..22d56760ec 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -882,10 +882,11 @@ const AVCodec *av_codec_iterate(void **opaque)
ff_thread_once(&av_codec_static_init, av_codec_init_static);
- if (c)
+ if (c) {
*opaque = (void*)(i + 1);
-
- return &c->p;
+ return &c->p;
+ }
+ return NULL;
}
static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)
--
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".
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs Michael Niedermayer
@ 2022-03-21 20:33 ` James Almer
2022-03-21 20:55 ` Andreas Rheinhardt
2022-03-21 20:48 ` Andreas Rheinhardt
1 sibling, 1 reply; 13+ messages in thread
From: James Almer @ 2022-03-21 20:33 UTC (permalink / raw)
To: ffmpeg-devel
On 3/21/2022 5:19 PM, Michael Niedermayer wrote:
> Fixes: member access within null pointer of type 'const FFCodec' (aka 'const struct FFCodec')
> Fixes: 45726/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6554445419249664
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavcodec/allcodecs.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> index b1aa7e266b..22d56760ec 100644
> --- a/libavcodec/allcodecs.c
> +++ b/libavcodec/allcodecs.c
> @@ -882,10 +882,11 @@ const AVCodec *av_codec_iterate(void **opaque)
>
> ff_thread_once(&av_codec_static_init, av_codec_init_static);
>
> - if (c)
> + if (c) {
> *opaque = (void*)(i + 1);
> -
> - return &c->p;
> + return &c->p;
> + }
> + return NULL;
Can't you just do
return (const AVCodec *)c;
Or is that aliasing a problem?
> }
>
> static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)
_______________________________________________
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".
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs
2022-03-21 20:33 ` James Almer
@ 2022-03-21 20:55 ` Andreas Rheinhardt
0 siblings, 0 replies; 13+ messages in thread
From: Andreas Rheinhardt @ 2022-03-21 20:55 UTC (permalink / raw)
To: ffmpeg-devel
James Almer:
>
>
> On 3/21/2022 5:19 PM, Michael Niedermayer wrote:
>> Fixes: member access within null pointer of type 'const FFCodec' (aka
>> 'const struct FFCodec')
>> Fixes:
>> 45726/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6554445419249664
>>
>>
>> Found-by: continuous fuzzing process
>> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
>> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
>> ---
>> libavcodec/allcodecs.c | 7 ++++---
>> 1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
>> index b1aa7e266b..22d56760ec 100644
>> --- a/libavcodec/allcodecs.c
>> +++ b/libavcodec/allcodecs.c
>> @@ -882,10 +882,11 @@ const AVCodec *av_codec_iterate(void **opaque)
>> ff_thread_once(&av_codec_static_init, av_codec_init_static);
>> - if (c)
>> + if (c) {
>> *opaque = (void*)(i + 1);
>> -
>> - return &c->p;
>> + return &c->p;
>> + }
>> + return NULL;
>
> Can't you just do
>
> return (const AVCodec *)c;
>
> Or is that aliasing a problem?
>
There is no aliasing problem: It is perfectly legal to cast a pointer to
a struct to a pointer to its first member. But it unnecessarily
circumvents the type system, so this patch here is better.
- Andreas
_______________________________________________
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".
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs Michael Niedermayer
2022-03-21 20:33 ` James Almer
@ 2022-03-21 20:48 ` Andreas Rheinhardt
2022-03-21 21:03 ` Michael Niedermayer
1 sibling, 1 reply; 13+ messages in thread
From: Andreas Rheinhardt @ 2022-03-21 20:48 UTC (permalink / raw)
To: ffmpeg-devel
Michael Niedermayer:
> Fixes: member access within null pointer of type 'const FFCodec' (aka 'const struct FFCodec')
> Fixes: 45726/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6554445419249664
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavcodec/allcodecs.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> index b1aa7e266b..22d56760ec 100644
> --- a/libavcodec/allcodecs.c
> +++ b/libavcodec/allcodecs.c
> @@ -882,10 +882,11 @@ const AVCodec *av_codec_iterate(void **opaque)
>
> ff_thread_once(&av_codec_static_init, av_codec_init_static);
>
> - if (c)
> + if (c) {
> *opaque = (void*)(i + 1);
> -
> - return &c->p;
> + return &c->p;
> + }
> + return NULL;
> }
>
> static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)
LGTM.
- Andreas
_______________________________________________
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".
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs
2022-03-21 20:48 ` Andreas Rheinhardt
@ 2022-03-21 21:03 ` Michael Niedermayer
0 siblings, 0 replies; 13+ messages in thread
From: Michael Niedermayer @ 2022-03-21 21:03 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 1472 bytes --]
On Mon, Mar 21, 2022 at 09:48:40PM +0100, Andreas Rheinhardt wrote:
> Michael Niedermayer:
> > Fixes: member access within null pointer of type 'const FFCodec' (aka 'const struct FFCodec')
> > Fixes: 45726/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6554445419249664
> >
> > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> > libavcodec/allcodecs.c | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> > index b1aa7e266b..22d56760ec 100644
> > --- a/libavcodec/allcodecs.c
> > +++ b/libavcodec/allcodecs.c
> > @@ -882,10 +882,11 @@ const AVCodec *av_codec_iterate(void **opaque)
> >
> > ff_thread_once(&av_codec_static_init, av_codec_init_static);
> >
> > - if (c)
> > + if (c) {
> > *opaque = (void*)(i + 1);
> > -
> > - return &c->p;
> > + return &c->p;
> > + }
> > + return NULL;
> > }
> >
> > static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)
>
> LGTM.
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 13+ messages in thread
* [FFmpeg-devel] [PATCH 3/5] avcodec/vmdaudio: Fix channels count bug
2022-03-21 20:19 [FFmpeg-devel] [PATCH 1/5] avcodec/vp9_superframe_bsf: Check in size Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs Michael Niedermayer
@ 2022-03-21 20:19 ` Michael Niedermayer
2022-03-28 18:07 ` Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 4/5] avcodec/diracdec: avoid signed integer overflow in global mv Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 5/5] avcodec/exr: Avoid signed overflow in displayWindow Michael Niedermayer
3 siblings, 1 reply; 13+ messages in thread
From: Michael Niedermayer @ 2022-03-21 20:19 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: division by zero
Fixes: 45811/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMDAUDIO_fuzzer-6412592581574656
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/vmdaudio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/vmdaudio.c b/libavcodec/vmdaudio.c
index 045a2da410..875930061a 100644
--- a/libavcodec/vmdaudio.c
+++ b/libavcodec/vmdaudio.c
@@ -85,7 +85,7 @@ static av_cold int vmdaudio_decode_init(AVCodecContext *avctx)
}
av_channel_layout_uninit(&avctx->ch_layout);
- av_channel_layout_default(&avctx->ch_layout, channels == 1);
+ av_channel_layout_default(&avctx->ch_layout, channels);
if (avctx->bits_per_coded_sample == 16)
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
--
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".
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [FFmpeg-devel] [PATCH 3/5] avcodec/vmdaudio: Fix channels count bug
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 3/5] avcodec/vmdaudio: Fix channels count bug Michael Niedermayer
@ 2022-03-28 18:07 ` Michael Niedermayer
0 siblings, 0 replies; 13+ messages in thread
From: Michael Niedermayer @ 2022-03-28 18:07 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 695 bytes --]
On Mon, Mar 21, 2022 at 09:19:44PM +0100, Michael Niedermayer wrote:
> Fixes: division by zero
> Fixes: 45811/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMDAUDIO_fuzzer-6412592581574656
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavcodec/vmdaudio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
will apply
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 13+ messages in thread
* [FFmpeg-devel] [PATCH 4/5] avcodec/diracdec: avoid signed integer overflow in global mv
2022-03-21 20:19 [FFmpeg-devel] [PATCH 1/5] avcodec/vp9_superframe_bsf: Check in size Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 3/5] avcodec/vmdaudio: Fix channels count bug Michael Niedermayer
@ 2022-03-21 20:19 ` Michael Niedermayer
2022-04-03 21:22 ` Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 5/5] avcodec/exr: Avoid signed overflow in displayWindow Michael Niedermayer
3 siblings, 1 reply; 13+ messages in thread
From: Michael Niedermayer @ 2022-03-21 20:19 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: signed integer overflow: -128275513086 * -76056576 cannot be represented in type 'long'
Fixes: 45818/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5129799149944832
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/diracdec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index d5c095c689..12f97feb6b 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -1433,8 +1433,8 @@ static void global_mv(DiracContext *s, DiracBlock *block, int x, int y, int ref)
int *c = s->globalmc[ref].perspective;
int64_t m = (1<<ep) - (c[0]*(int64_t)x + c[1]*(int64_t)y);
- int64_t mx = m * (int64_t)((A[0][0] * (int64_t)x + A[0][1]*(int64_t)y) + (1LL<<ez) * b[0]);
- int64_t my = m * (int64_t)((A[1][0] * (int64_t)x + A[1][1]*(int64_t)y) + (1LL<<ez) * b[1]);
+ int64_t mx = m * (uint64_t)((A[0][0] * (int64_t)x + A[0][1]*(int64_t)y) + (1LL<<ez) * b[0]);
+ int64_t my = m * (uint64_t)((A[1][0] * (int64_t)x + A[1][1]*(int64_t)y) + (1LL<<ez) * b[1]);
block->u.mv[ref][0] = (mx + (1<<(ez+ep))) >> (ez+ep);
block->u.mv[ref][1] = (my + (1<<(ez+ep))) >> (ez+ep);
--
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".
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [FFmpeg-devel] [PATCH 4/5] avcodec/diracdec: avoid signed integer overflow in global mv
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 4/5] avcodec/diracdec: avoid signed integer overflow in global mv Michael Niedermayer
@ 2022-04-03 21:22 ` Michael Niedermayer
0 siblings, 0 replies; 13+ messages in thread
From: Michael Niedermayer @ 2022-04-03 21:22 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 703 bytes --]
On Mon, Mar 21, 2022 at 09:19:45PM +0100, Michael Niedermayer wrote:
> Fixes: signed integer overflow: -128275513086 * -76056576 cannot be represented in type 'long'
> Fixes: 45818/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5129799149944832
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavcodec/diracdec.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
will apply
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 13+ messages in thread
* [FFmpeg-devel] [PATCH 5/5] avcodec/exr: Avoid signed overflow in displayWindow
2022-03-21 20:19 [FFmpeg-devel] [PATCH 1/5] avcodec/vp9_superframe_bsf: Check in size Michael Niedermayer
` (2 preceding siblings ...)
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 4/5] avcodec/diracdec: avoid signed integer overflow in global mv Michael Niedermayer
@ 2022-03-21 20:19 ` Michael Niedermayer
2022-03-22 10:42 ` Paul B Mahol
3 siblings, 1 reply; 13+ messages in thread
From: Michael Niedermayer @ 2022-03-21 20:19 UTC (permalink / raw)
To: FFmpeg development discussions and patches
The inputs are unused except for this computation so wraparound
does not give an attacker any extra values as they are already fully
controlled
Fixes: signed integer overflow: 0 - -2147483648 cannot be represented in type 'int'
Fixes: 45820/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5766159019933696
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/exr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index dd5924245f..f338ff0085 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -1833,8 +1833,8 @@ static int decode_header(EXRContext *s, AVFrame *frame)
dx = bytestream2_get_le32(gb);
dy = bytestream2_get_le32(gb);
- s->w = dx - sx + 1;
- s->h = dy - sy + 1;
+ s->w = (unsigned)dx - sx + 1;
+ s->h = (unsigned)dy - sy + 1;
continue;
} else if ((var_size = check_header_variable(s, "lineOrder",
--
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".
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2022-04-03 21:23 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 20:19 [FFmpeg-devel] [PATCH 1/5] avcodec/vp9_superframe_bsf: Check in size Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 2/5] avcodec/allcodecs: Dont play with NULLs Michael Niedermayer
2022-03-21 20:33 ` James Almer
2022-03-21 20:55 ` Andreas Rheinhardt
2022-03-21 20:48 ` Andreas Rheinhardt
2022-03-21 21:03 ` Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 3/5] avcodec/vmdaudio: Fix channels count bug Michael Niedermayer
2022-03-28 18:07 ` Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 4/5] avcodec/diracdec: avoid signed integer overflow in global mv Michael Niedermayer
2022-04-03 21:22 ` Michael Niedermayer
2022-03-21 20:19 ` [FFmpeg-devel] [PATCH 5/5] avcodec/exr: Avoid signed overflow in displayWindow Michael Niedermayer
2022-03-22 10:42 ` Paul B Mahol
2022-04-03 21:23 ` Michael Niedermayer
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git