Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Tomas Härdin" <git@haerdin.se>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec: add farbfeld encoder
Date: Tue, 18 Jun 2024 16:48:14 +0200
Message-ID: <00e35e6d09aac1b70ea7ab7e62ad24b144de1cce.camel@haerdin.se> (raw)
In-Reply-To: <J5nuh-7mHUYp3H0L85iBKMHoH8gF2T9EKFI2Zm-2hKogoUTdYUCY_bUUh71_cDJ4t0rT1dr9Tmvcfnc3L9hvKViVGKIJ-rNRC27yqd6P9ww=@marcusspencer.xyz>

mån 2024-06-03 klockan 19:16 +0000 skrev marcus:
> > 
> > 
> > > Check the return value of av_image_get_buffer_size() before
> > > adding
> > 
> > > HEADER_SIZE to it. There will be a signed overflow (UB) for
> > > images of
> > > size 16385x16385 (and many others).
> > 
> > 
> > Sorry, I missed the multiplication by h+128 in
> > av_image_check_size2().
> > So this isn't a problem in this specific case.
> > 
> > > Aside: av_image_get_buffer_size() will UB for sizes above INT_MAX
> > > because the size_t's in sizes[] get accumulated into an int.
> > > Besides
> > > the UB it also returns incorrect values.
> > 
> > 
> > This however is a problem for planar formats. This doesn't affect
> > this patch however.
> Did you incorrectly format that message? Or did you really mean that
> the UB when the size is greater than INT_MAX doesn't affect my patch?

It doesn't affect this patch because AV_PIX_FMT_RGBA64BE isn't planar

/Tomas
_______________________________________________
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:[~2024-06-18 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03  3:33 Marcus B Spencer
2024-06-03  9:39 ` Stefano Sabatini
2024-06-03 12:10 ` Tomas Härdin
2024-06-03 12:35   ` Tomas Härdin
2024-06-03 19:16     ` marcus
2024-06-18 14:48       ` Tomas Härdin [this message]
2024-06-18 21:40 ` Lynne via ffmpeg-devel

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=00e35e6d09aac1b70ea7ab7e62ad24b144de1cce.camel@haerdin.se \
    --to=git@haerdin.se \
    --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