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: Mon, 03 Jun 2024 14:10:59 +0200 Message-ID: <a7290d1510359b67cd307e6d03ecc38d56cdaf00.camel@haerdin.se> (raw) In-Reply-To: <20240603033321.357618-1-marcus@marcusspencer.xyz> This format seems to reproduce some of the same issues as QOI: > The RGB-data should be sRGB for best interoperability and not alpha- > premultiplied. This seems to imply it could be something other than sRGB since it says SHOULD rather than MUST. This probably isn't a huge issue, but it should be clearer on the website. It also doesn't say whether alpha is linear or not. > + int pkt_size = HEADER_SIZE + av_image_get_buffer_size( > + p->format, > + p->width, > + p->height, > + 1 > + ); 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). 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. /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".
next prev parent reply other threads:[~2024-06-03 12:11 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 [this message] 2024-06-03 12:35 ` Tomas Härdin 2024-06-03 19:16 ` marcus 2024-06-18 14:48 ` Tomas Härdin 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=a7290d1510359b67cd307e6d03ecc38d56cdaf00.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