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] avcodec/lcldec: fix uncompressed buffer size calculation
@ 2023-09-30 10:36 Paul B Mahol
  2023-10-02 14:23 ` Paul B Mahol
  0 siblings, 1 reply; 5+ messages in thread
From: Paul B Mahol @ 2023-09-30 10:36 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

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

Attached.

[-- Attachment #2: 0001-avcodec-lcldec-fix-uncompressed-buffer-size-calculat.patch --]
[-- Type: text/x-patch, Size: 923 bytes --]

From efa34f7cd140f4e696641ce730b8e2b97e3d8452 Mon Sep 17 00:00:00 2001
From: Paul B Mahol <onemda@gmail.com>
Date: Sat, 30 Sep 2023 12:33:58 +0200
Subject: [PATCH] avcodec/lcldec: fix uncompressed buffer size calculation

The width is truncated to multiple of 2.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/lcldec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 11e28683ba..3168f9697f 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -248,7 +248,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
                 bppx2 = 0; // will error out below
                 break;
             }
-            if (len < ((width * height * bppx2) >> 1))
+            if (len < (((width & 0xFFFFFFFC) * height * bppx2) >> 1))
                 return AVERROR_INVALIDDATA;
             break;
         }
-- 
2.42.0


[-- 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".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avcodec/lcldec: fix uncompressed buffer size calculation
  2023-09-30 10:36 [FFmpeg-devel] [PATCH] avcodec/lcldec: fix uncompressed buffer size calculation Paul B Mahol
@ 2023-10-02 14:23 ` Paul B Mahol
  2023-10-02 19:00   ` Michael Niedermayer
  0 siblings, 1 reply; 5+ messages in thread
From: Paul B Mahol @ 2023-10-02 14:23 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On 9/30/23, Paul B Mahol <onemda@gmail.com> wrote:
> Attached.
>

Gonna apply soon.
_______________________________________________
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] avcodec/lcldec: fix uncompressed buffer size calculation
  2023-10-02 14:23 ` Paul B Mahol
@ 2023-10-02 19:00   ` Michael Niedermayer
  2023-10-02 19:42     ` Paul B Mahol
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Niedermayer @ 2023-10-02 19:00 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


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

Hi Paul

On Mon, Oct 02, 2023 at 04:23:54PM +0200, Paul B Mahol wrote:
> On 9/30/23, Paul B Mahol <onemda@gmail.com> wrote:
> > Attached.
> >
> 
> Gonna apply soon.

Did you look at
"avcodec/lcldec: Make PNG filter addressing match the code afterwards"

You patch is simpler (which is good)
but it leaves some pixel addressing unchanged, it just changes the
check.
Just want to make sure that is intended

thx

[...]

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

* Re: [FFmpeg-devel] [PATCH] avcodec/lcldec: fix uncompressed buffer size calculation
  2023-10-02 19:00   ` Michael Niedermayer
@ 2023-10-02 19:42     ` Paul B Mahol
  2023-10-03 13:55       ` Michael Niedermayer
  0 siblings, 1 reply; 5+ messages in thread
From: Paul B Mahol @ 2023-10-02 19:42 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On 10/2/23, Michael Niedermayer <michael@niedermayer.cc> wrote:
> Hi Paul
>
> On Mon, Oct 02, 2023 at 04:23:54PM +0200, Paul B Mahol wrote:
>> On 9/30/23, Paul B Mahol <onemda@gmail.com> wrote:
>> > Attached.
>> >
>>
>> Gonna apply soon.
>
> Did you look at
> "avcodec/lcldec: Make PNG filter addressing match the code afterwards"
>
> You patch is simpler (which is good)
> but it leaves some pixel addressing unchanged, it just changes the
> check.
> Just want to make sure that is intended

Why that patch is not applied?

>
> thx
>
> [...]
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
>
_______________________________________________
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] avcodec/lcldec: fix uncompressed buffer size calculation
  2023-10-02 19:42     ` Paul B Mahol
@ 2023-10-03 13:55       ` Michael Niedermayer
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Niedermayer @ 2023-10-03 13:55 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


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

On Mon, Oct 02, 2023 at 09:42:25PM +0200, Paul B Mahol wrote:
> On 10/2/23, Michael Niedermayer <michael@niedermayer.cc> wrote:
> > Hi Paul
> >
> > On Mon, Oct 02, 2023 at 04:23:54PM +0200, Paul B Mahol wrote:
> >> On 9/30/23, Paul B Mahol <onemda@gmail.com> wrote:
> >> > Attached.
> >> >
> >>
> >> Gonna apply soon.
> >
> > Did you look at
> > "avcodec/lcldec: Make PNG filter addressing match the code afterwards"
> >
> > You patch is simpler (which is good)
> > but it leaves some pixel addressing unchanged, it just changes the
> > check.
> > Just want to make sure that is intended
> 
> Why that patch is not applied?

I forgot, i will apply it

thx


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

Elect your leaders based on what they did after the last election, not
based on what they say before an election.


[-- 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:[~2023-10-03 13:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-30 10:36 [FFmpeg-devel] [PATCH] avcodec/lcldec: fix uncompressed buffer size calculation Paul B Mahol
2023-10-02 14:23 ` Paul B Mahol
2023-10-02 19:00   ` Michael Niedermayer
2023-10-02 19:42     ` Paul B Mahol
2023-10-03 13:55       ` 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