Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/2] avformat/avr: Check sample rate
@ 2023-07-22 23:46 Michael Niedermayer
  2023-07-22 23:46 ` [FFmpeg-devel] [PATCH 2/2] tools/target_dec_fuzzer: Adjust threshold for jpeg2000 Michael Niedermayer
  2023-08-01 10:55 ` [FFmpeg-devel] [PATCH 1/2] avformat/avr: Check sample rate Andreas Rheinhardt
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Niedermayer @ 2023-07-22 23:46 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Fixes: 54979/clusterfuzz-testcase-minimized-ffmpeg_dem_AVR_fuzzer-6681035461230592
Fixes: Timeout

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

diff --git a/libavformat/avr.c b/libavformat/avr.c
index 1cc4d56bfb..3fe8614b25 100644
--- a/libavformat/avr.c
+++ b/libavformat/avr.c
@@ -75,6 +75,9 @@ static int avr_read_header(AVFormatContext *s)
     avio_skip(s->pb, 20);
     avio_skip(s->pb, 64);
 
+    if (st->codecpar->sample_rate == 0)
+        return AVERROR_INVALIDDATA;
+
     st->codecpar->codec_id = ff_get_pcm_codec_id(bps, 0, 1, sign);
     if (st->codecpar->codec_id == AV_CODEC_ID_NONE) {
         avpriv_request_sample(s, "Bps %d and sign %d", bps, sign);
-- 
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] 5+ messages in thread

* [FFmpeg-devel] [PATCH 2/2] tools/target_dec_fuzzer: Adjust threshold for jpeg2000
  2023-07-22 23:46 [FFmpeg-devel] [PATCH 1/2] avformat/avr: Check sample rate Michael Niedermayer
@ 2023-07-22 23:46 ` Michael Niedermayer
  2024-06-25 19:14   ` Michael Niedermayer
  2023-08-01 10:55 ` [FFmpeg-devel] [PATCH 1/2] avformat/avr: Check sample rate Andreas Rheinhardt
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Niedermayer @ 2023-07-22 23:46 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Fixes: Timeout
Fixes: 57385/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5394334324490240

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

diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 165951dc9d..10c380ef1c 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -247,7 +247,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
     case AV_CODEC_ID_IFF_ILBM:    maxpixels  /= 128;   break;
     case AV_CODEC_ID_INDEO4:      maxpixels  /= 128;   break;
     case AV_CODEC_ID_INTERPLAY_ACM: maxsamples /= 16384;  break;
-    case AV_CODEC_ID_JPEG2000:    maxpixels  /= 4096;  break;
+    case AV_CODEC_ID_JPEG2000:    maxpixels  /= 16384; break;
     case AV_CODEC_ID_LAGARITH:    maxpixels  /= 1024;  break;
     case AV_CODEC_ID_LOCO:        maxpixels  /= 1024;  break;
     case AV_CODEC_ID_VORBIS:      maxsamples /= 1024;  break;
-- 
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] 5+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] avformat/avr: Check sample rate
  2023-07-22 23:46 [FFmpeg-devel] [PATCH 1/2] avformat/avr: Check sample rate Michael Niedermayer
  2023-07-22 23:46 ` [FFmpeg-devel] [PATCH 2/2] tools/target_dec_fuzzer: Adjust threshold for jpeg2000 Michael Niedermayer
@ 2023-08-01 10:55 ` Andreas Rheinhardt
  2023-08-01 19:25   ` Michael Niedermayer
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Rheinhardt @ 2023-08-01 10:55 UTC (permalink / raw)
  To: ffmpeg-devel

Michael Niedermayer:
> Fixes: 54979/clusterfuzz-testcase-minimized-ffmpeg_dem_AVR_fuzzer-6681035461230592
> Fixes: Timeout
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavformat/avr.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavformat/avr.c b/libavformat/avr.c
> index 1cc4d56bfb..3fe8614b25 100644
> --- a/libavformat/avr.c
> +++ b/libavformat/avr.c
> @@ -75,6 +75,9 @@ static int avr_read_header(AVFormatContext *s)
>      avio_skip(s->pb, 20);
>      avio_skip(s->pb, 64);
>  
> +    if (st->codecpar->sample_rate == 0)
> +        return AVERROR_INVALIDDATA;
> +
>      st->codecpar->codec_id = ff_get_pcm_codec_id(bps, 0, 1, sign);
>      if (st->codecpar->codec_id == AV_CODEC_ID_NONE) {
>          avpriv_request_sample(s, "Bps %d and sign %d", bps, sign);

Why don't you check this directly after having read the sample rate?
That way the value would still be in a register.

- 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] 5+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] avformat/avr: Check sample rate
  2023-08-01 10:55 ` [FFmpeg-devel] [PATCH 1/2] avformat/avr: Check sample rate Andreas Rheinhardt
@ 2023-08-01 19:25   ` Michael Niedermayer
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Niedermayer @ 2023-08-01 19:25 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 1507 bytes --]

On Tue, Aug 01, 2023 at 12:55:49PM +0200, Andreas Rheinhardt wrote:
> Michael Niedermayer:
> > Fixes: 54979/clusterfuzz-testcase-minimized-ffmpeg_dem_AVR_fuzzer-6681035461230592
> > Fixes: Timeout
> > 
> > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >  libavformat/avr.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/libavformat/avr.c b/libavformat/avr.c
> > index 1cc4d56bfb..3fe8614b25 100644
> > --- a/libavformat/avr.c
> > +++ b/libavformat/avr.c
> > @@ -75,6 +75,9 @@ static int avr_read_header(AVFormatContext *s)
> >      avio_skip(s->pb, 20);
> >      avio_skip(s->pb, 64);
> >  
> > +    if (st->codecpar->sample_rate == 0)
> > +        return AVERROR_INVALIDDATA;
> > +
> >      st->codecpar->codec_id = ff_get_pcm_codec_id(bps, 0, 1, sign);
> >      if (st->codecpar->codec_id == AV_CODEC_ID_NONE) {
> >          avpriv_request_sample(s, "Bps %d and sign %d", bps, sign);
> 
> Why don't you check this directly after having read the sample rate?
> That way the value would still be in a register.

that would be cleaner too, I will apply it with that change

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Take away the freedom of one citizen and you will be jailed, take away
the freedom of all citizens and you will be congratulated by your peers
in Parliament.

[-- 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] 5+ messages in thread

* Re: [FFmpeg-devel] [PATCH 2/2] tools/target_dec_fuzzer: Adjust threshold for jpeg2000
  2023-07-22 23:46 ` [FFmpeg-devel] [PATCH 2/2] tools/target_dec_fuzzer: Adjust threshold for jpeg2000 Michael Niedermayer
@ 2024-06-25 19:14   ` Michael Niedermayer
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Niedermayer @ 2024-06-25 19:14 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 793 bytes --]

On Sun, Jul 23, 2023 at 01:46:21AM +0200, Michael Niedermayer wrote:
> Fixes: Timeout
> Fixes: 57385/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5394334324490240
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  tools/target_dec_fuzzer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If the United States is serious about tackling the national security threats 
related to an insecure 5G network, it needs to rethink the extent to which it
values corporate profits and government espionage over security.-Bruce Schneier

[-- 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] 5+ messages in thread

end of thread, other threads:[~2024-06-25 19:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-22 23:46 [FFmpeg-devel] [PATCH 1/2] avformat/avr: Check sample rate Michael Niedermayer
2023-07-22 23:46 ` [FFmpeg-devel] [PATCH 2/2] tools/target_dec_fuzzer: Adjust threshold for jpeg2000 Michael Niedermayer
2024-06-25 19:14   ` Michael Niedermayer
2023-08-01 10:55 ` [FFmpeg-devel] [PATCH 1/2] avformat/avr: Check sample rate Andreas Rheinhardt
2023-08-01 19:25   ` 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