From: Peter Ross <pross@xvid.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 1/9] avcodec/vqcdec: Check init_get_bits8() for failure
Date: Sun, 19 May 2024 13:18:09 +1000
Message-ID: <ZklvcaVb7TyYjXwQ@fa7e0802a724d30006d4dce511c573ba> (raw)
In-Reply-To: <20240519024915.1944150-1-michael@niedermayer.cc>
[-- Attachment #1.1: Type: text/plain, Size: 1101 bytes --]
On Sun, May 19, 2024 at 04:49:07AM +0200, Michael Niedermayer wrote:
> Fixes: CID1516090 Unchecked return value
>
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavcodec/vqcdec.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/vqcdec.c b/libavcodec/vqcdec.c
> index 5c6cab3c1ab..bb69844327d 100644
> --- a/libavcodec/vqcdec.c
> +++ b/libavcodec/vqcdec.c
> @@ -147,10 +147,13 @@ static int decode_vectors(VqcContext * s, const uint8_t * buf, int size, int wid
> GetBitContext gb;
> uint8_t * vectors = s->vectors;
> uint8_t * vectors_end = s->vectors + (width * height * 3) / 2;
> + int ret;
>
> memset(vectors, 0, 3 * width * height / 2);
>
> - init_get_bits8(&gb, buf, size);
> + ret = init_get_bits8(&gb, buf, size);
> + if (ret < 0)
> + return ret;
>
> for (int i = 0; i < 3 * width * height / 2 / 32; i++) {
> uint8_t * dst = vectors;
ok
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
[-- 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".
next prev parent reply other threads:[~2024-05-19 3:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-19 2:49 Michael Niedermayer
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 2/9] avcodec/vvc/ctu: Simplify code at the end of pred_mode_decode() Michael Niedermayer
2024-07-12 21:24 ` Michael Niedermayer
2024-07-13 2:06 ` Nuo Mi
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 3/9] avcodec/vvc/ctu: Simplify pred_mode_plt_flag Michael Niedermayer
2024-05-19 14:40 ` Nuo Mi
2024-05-19 19:27 ` Michael Niedermayer
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 4/9] avcodec/vvc/ctu: Remove dead ret check Michael Niedermayer
2024-07-02 18:35 ` Michael Niedermayer
2024-07-03 12:44 ` Nuo Mi
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 5/9] avcodec/vvc/dec: Remove constant eos_at_start Michael Niedermayer
2024-07-02 18:34 ` Michael Niedermayer
2024-07-03 12:44 ` Nuo Mi
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 6/9] avcodec/vvc/dec: Check init_get_bits8() for failure Michael Niedermayer
2024-05-19 14:31 ` Nuo Mi
2024-05-19 19:39 ` Michael Niedermayer
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 7/9] avcodec/vvc/mvs: Initialize mvf Michael Niedermayer
2024-05-19 14:28 ` Nuo Mi
2024-05-19 19:40 ` Michael Niedermayer
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 8/9] avcodec/wavpack: Remove dead assignments Michael Niedermayer
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 9/9] avcodec/wavpackenc: Use unsigned for potential 31bit shift Michael Niedermayer
2024-06-02 19:08 ` Michael Niedermayer
2024-05-19 3:18 ` Peter Ross [this message]
2024-05-19 19:37 ` [FFmpeg-devel] [PATCH 1/9] avcodec/vqcdec: Check init_get_bits8() for failure Michael Niedermayer
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=ZklvcaVb7TyYjXwQ@fa7e0802a724d30006d4dce511c573ba \
--to=pross@xvid.org \
--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