Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Paul B Mahol <onemda@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] avcodec/flac: critical fix
Date: Sun, 4 Sep 2022 20:54:54 +0200
Message-ID: <CAPYw7P7tjX1sVgBTC76UHKT2Zv4dvTLmzBQZPs6Xrm=P_qmNWA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 34 bytes --]

Another critical fix for decoder.

[-- Attachment #2: 0001-avcodec-flac-smallest-frame-is-10-bytes.patch --]
[-- Type: text/x-patch, Size: 1304 bytes --]

From e61c05f721eee756739ba7cd864486ea9704b3c9 Mon Sep 17 00:00:00 2001
From: Paul B Mahol <onemda@gmail.com>
Date: Sun, 4 Sep 2022 20:50:16 +0200
Subject: [PATCH] avcodec/flac: smallest frame is 10 bytes

Fixes #9270

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/flac.h    | 2 +-
 libavcodec/flacdec.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/flac.h b/libavcodec/flac.h
index f118dbbff3..00e631ed20 100644
--- a/libavcodec/flac.h
+++ b/libavcodec/flac.h
@@ -33,7 +33,7 @@
 #define FLAC_MAX_CHANNELS       8
 #define FLAC_MIN_BLOCKSIZE     16
 #define FLAC_MAX_BLOCKSIZE  65535
-#define FLAC_MIN_FRAME_SIZE    11
+#define FLAC_MIN_FRAME_SIZE    10
 
 enum {
     FLAC_CHMODE_INDEPENDENT = 0,
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index 075d76bc8a..5b8547a98f 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -577,7 +577,7 @@ static int flac_decode_frame(AVCodecContext *avctx, AVFrame *frame,
 
     /* check that there is at least the smallest decodable amount of data.
        this amount corresponds to the smallest valid FLAC frame possible.
-       FF F8 69 02 00 00 9A 00 00 34 46 */
+       FF F8 69 02 00 00 9A 00 00 34 */
     if (buf_size < FLAC_MIN_FRAME_SIZE)
         return buf_size;
 
-- 
2.37.2


[-- Attachment #3: 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".

             reply	other threads:[~2022-09-04 18:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-04 18:54 Paul B Mahol [this message]
2022-09-04 19:11 ` Leo Izen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPYw7P7tjX1sVgBTC76UHKT2Zv4dvTLmzBQZPs6Xrm=P_qmNWA@mail.gmail.com' \
    --to=onemda@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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