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 216EE44817 for ; Thu, 27 Oct 2022 19:46:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E5CE068BC53; Thu, 27 Oct 2022 22:46:30 +0300 (EEST) Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1810C68BC1A for ; Thu, 27 Oct 2022 22:46:23 +0300 (EEST) Received: from 987c2d4c0328e35dfd21c64de9c21a13 ([1.145.236.2]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id 29RJkIAK009906 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for ; Thu, 27 Oct 2022 19:46:21 GMT Date: Fri, 28 Oct 2022 06:46:13 +1100 From: Peter Ross To: ffmpeg-devel@ffmpeg.org Message-ID: <1cf46f33b16c0ae34d1f6f193a051220211f5d04.1666899957.git.pross@xvid.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/svq3: perform residual slice copy before xor'ing watermark key 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="===============0970006587565056173==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0970006587565056173== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Wi7tTXQ44PT7sF4Z" Content-Disposition: inline --Wi7tTXQ44PT7sF4Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Fixes ticket #5387 --- libavcodec/svq3.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index 7e8f16cc72..b96c4f61f6 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1037,15 +1037,16 @@ static int svq3_decode_slice_header(AVCodecContext = *avctx) } memcpy(s->slice_buf, s->gb.buffer + s->gb.index / 8, slice_bytes); =20 + if (length > 0) { + memmove(s->slice_buf, &s->slice_buf[slice_length], length - 1); + } + if (s->watermark_key) { uint32_t header =3D AV_RL32(&s->slice_buf[1]); AV_WL32(&s->slice_buf[1], header ^ s->watermark_key); } init_get_bits(&s->gb_slice, s->slice_buf, slice_bits); =20 - if (length > 0) { - memmove(s->slice_buf, &s->slice_buf[slice_length], length - 1); - } skip_bits_long(&s->gb, slice_bytes * 8); } =20 --=20 2.35.1 -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) --Wi7tTXQ44PT7sF4Z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSpB+AvpuUM0jTNINJnYHnFrEDdawUCY1rgBQAKCRBnYHnFrEDd a3GGAJ936ik9US/YOjuYyNam+1E5Y+TaUQCfTQjN+e5ETwzcC70IU0VSfTCMRI8= =RAZ5 -----END PGP SIGNATURE----- --Wi7tTXQ44PT7sF4Z-- --===============0970006587565056173== 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". --===============0970006587565056173==--