From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id B5E8E4ACE8 for ; Sun, 19 May 2024 19:49:02 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6E41168D01E; Sun, 19 May 2024 22:48:59 +0300 (EEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BDCF168C07E for ; Sun, 19 May 2024 22:48:52 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 27062240003 for ; Sun, 19 May 2024 19:48:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1716148132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7iGqjcXCGdq3yX1KkwxHWEHDdtQGfcFrHgmuK6yAnN0=; b=VvRaq13J9YroOpVD1vz+uZD08vVNRlz9JCwcjew5dBH+cTjRj1RhEXVAPQ03OaEMlZCyWr juekInvL9u/flPdtUtGuSI8HXgZCx8YIs0WkhL/6UdgYVT8RZiOxvGqc+ksrVRyAMv4dfQ ETgAGDzGf/YkD+edAEGXDbXQSeAJCwUmjK4NqBcyehIuI4XtEY8TWoQoEgjGZyQym1wx1r 4LKUpKHbQotghCknNpOCpdknFUAj4lr6ksxMYVdsDJVU/5XT0ffQ+fxZINm+rMcN+thtWg QDlhR18VeDge24Wv0hlDQf9OogBASnmjJWbo7UO8ox/lsSONrZOHyy7kh/Lqvg== Date: Sun, 19 May 2024 21:48:51 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240519194851.GM2821752@pb2> References: <20240516231932.6950-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 1/5] avcodec/rv34: assert that size is not 0 in rv34_gen_vlc_ext() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============3757872835633897878==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3757872835633897878== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1rguoi8KZGYj2k4L" Content-Disposition: inline --1rguoi8KZGYj2k4L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 19, 2024 at 06:05:20PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Helps: CID1548380 Uninitialized scalar variable > >=20 > > Sponsored-by: Sovereign Tech Fund > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/rv34.c | 2 ++ > > 1 file changed, 2 insertions(+) > >=20 > > diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c > > index 23a570bb807..4ce0cc58d05 100644 > > --- a/libavcodec/rv34.c > > +++ b/libavcodec/rv34.c > > @@ -98,6 +98,8 @@ static av_cold void rv34_gen_vlc_ext(const uint8_t *b= its, int size, VLC *vlc, > > uint16_t cw[MAX_VLC_SIZE]; > > int maxbits; > > =20 > > + av_assert0(size > 0); > > + > > for (int i =3D 0; i < size; i++) > > counts[bits[i]]++; > > =20 >=20 > An av_assert0 just because of Coverity? Why not av_assert1? the function is av_cold, so it doesnt really matter i think but changed to av_assert1 locally thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Nations do behave wisely once they have exhausted all other alternatives.= =20 -- Abba Eban --1rguoi8KZGYj2k4L Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZkpXowAKCRBhHseHBAsP q7I8AJ9rVctVw89BclErynybeExyZ7a2wACfd1XfKcV1ObfU7NFjfGgdvS1Jr/M= =Ghar -----END PGP SIGNATURE----- --1rguoi8KZGYj2k4L-- --===============3757872835633897878== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============3757872835633897878==--