Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] add prores bitstream demuxer and muxer
Date: Mon, 24 Jul 2023 12:29:26 -0300
Message-ID: <ad925a97-0fd6-c3f3-c499-9238b4a64f7a@gmail.com> (raw)
In-Reply-To: <1f7bcbf99d1d8218259e2ed634771faa8d25f733.camel@haerdin.se>

On 7/24/2023 12:25 PM, Tomas Härdin wrote:
>> +static int prores_check_frame_header(const uint8_t *buf, const int
>> data_size)
>> +{
>> +    int hdr_size, width, height;
>> +    int version, alpha_info;
>> +
>> +    hdr_size = AV_RB16(buf);
>> +    if (hdr_size < 20)
>> +        return AVERROR_INVALIDDATA;
>> +
>> +    version = buf[3];
>> +    if (version > 1)
>> +        return AVERROR_INVALIDDATA;
>> +
>> +    width  = AV_RB16(buf + 8);
>> +    height = AV_RB16(buf + 10);
>> +    if (!width || !height)
>> +        return AVERROR_INVALIDDATA;
> 
> av_image_check_size2(). Also is this not already checked elsewhere?

This is for probing, so it's doing some basic bitstream checks to 
prevent false positives. It's irrelevant if AVFrame can handle it or 
not, as that'll be checked later.

That said, if Prores has an upper limit that's lower than 65535, then 
that should be checked too and not just zero.
_______________________________________________
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:[~2023-07-24 15:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24  2:37 hung kuishing
2023-07-24  7:25 ` Andreas Rheinhardt
2023-07-24  8:29   ` [FFmpeg-devel] 回复: " hung kuishing
2023-07-24 13:31 ` [FFmpeg-devel] " Derek Buitenhuis
2023-07-24 15:25 ` Tomas Härdin
2023-07-24 15:29   ` James Almer [this message]

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=ad925a97-0fd6-c3f3-c499-9238b4a64f7a@gmail.com \
    --to=jamrial@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