Message ID | AS8P250MB074458CE283166E83287B5958F2D9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM |
---|---|
State | Accepted |
Commit | 7c5d256c9c6f8361cd9dde24544b61cec177b3ec |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp926789pzb; Fri, 21 Oct 2022 11:59:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6h7CLrxm2y1PGSGQgGuDylkEvj1YphKR/YJEvsi+4XqCsqCrMFodBBZxkNKhVvKTOQFZjH X-Received: by 2002:a05:6402:847:b0:45b:d50c:b9aa with SMTP id b7-20020a056402084700b0045bd50cb9aamr18568123edz.289.1666378787814; Fri, 21 Oct 2022 11:59:47 -0700 (PDT) Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ae12-20020a17090725cc00b00783160b16a1si1272475ejc.397.2022.10.21.11.59.46; Fri, 21 Oct 2022 11:59:47 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=dElvvq55; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1FC4E68BEB7; Fri, 21 Oct 2022 21:59:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03olkn2046.outbound.protection.outlook.com [40.92.58.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E200568BE9A for <ffmpeg-devel@ffmpeg.org>; Fri, 21 Oct 2022 21:59:37 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iOI/G+wVxNzoorb/Y+hr5xuJqGLvZL6CtODzjzW10RczMUMmPGV3NB4CMLbfZwFHj91YBOI5jIqiy0tvBGtYSMs8ND9MxR+8dZS/fjHFqvDtgI2gzekPihiAGL/PUqGVxnf5+5u37l15XMveQpa5lz6K5CpnqYD3IsHDwzgWC53AlerSFMhX2U7kiUPTEPQ6T5LQkCqomw2w8gXQxhghyv0cbpKuGT8Il1SyV/TlrKhpBW6a6IGeHxvEinKh+kzjPcbXHR36L7gqIRbJUa3fq2l/8luxahNRt5NpQYPovj5CoQihrydKtZA2EnakOOTNRXZXPG03OmaVN3A6jzXsuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SL4c61EPLyj+aga355c9flH4mpJwGIbE9vBc3Oqhrcg=; b=gODVQ2z6Qy6kKtQoIUDdhV575muKb/zkokIBigQN5eTctHWEFl/t4sXGuXRg4+uqdirGqcoqoVdt2HjYRfHyQbIx1HLh7tTU/RYyOGDQ/ZauSjvlaFgiVlpKd9YC1oaKdLYj+UVNwsvMQFIe/ql1Kqf1wTvcq4VNgO8aLWf5WnhpV/5DSE2DRi0shytOM0kBzW6+cLurU2XBAPVXCbk26QMqUrzVFH/z39VxXK1PYxAc4FhMau17+cZLsTfRpXAW+hmbMn0NIRe7fBl8LhE9NgMDpSPqU73CzmDNEbo3zXzX5BLTfE7fO59EegxavK+Q/iXW0q3UkYQdxlV7uuZWTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SL4c61EPLyj+aga355c9flH4mpJwGIbE9vBc3Oqhrcg=; b=dElvvq557sld49f7PXp7bAoS2AoU4OKzed8LDyUOLVpKAfUxG4SX++PBhefKCqrKVB4U5k968G1fhgP60ZnQRu2l6r0RcCfdYIj7qCx77uOafFUEvmB1dMrCwmZScqx4wvz+hWA0Y9oecxqym29jiOrefm2h9jexoyyOhn3EPRdH4/wxQ0TQECUnPFZOgdu0zB6HZOtPDaUQqisRj1ssFoSHkEE5t/4LwM860GuYBsb0wXP8REzl7wcsybNYMapJaDdLh+jRbgMCtwBqmWIH63eackFaMG0qomB7ZB2EzQ8W4qB6MESJaXB2xaxI+Rd5jxTwfvpvTUR62urU5Bt1vg== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PRAP250MB0491.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:291::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 21 Oct 2022 18:59:36 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Fri, 21 Oct 2022 18:59:36 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Oct 2022 20:59:34 +0200 Message-ID: <AS8P250MB074458CE283166E83287B5958F2D9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> X-Mailer: git-send-email 2.34.1 In-Reply-To: <AS8P250MB0744FE41BC5B8476814DEFFD8F2D9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> References: <AS8P250MB0744FE41BC5B8476814DEFFD8F2D9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> X-TMN: [XyJiHuGfdStaAYYqS7l2D+E+cUjwZv79kx7OV8atUUE=] X-ClientProxiedBy: FR0P281CA0047.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:48::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221021185939.3096155-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PRAP250MB0491:EE_ X-MS-Office365-Filtering-Correlation-Id: 15f187c6-84ed-4c8e-dcc0-08dab39665f1 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmoyh0/rGpTlCzjnzrUxdxR9vNfqogC69P2PQYY8steROLJv+7oO9ajDRZxlC+lnojkkunPPNUIV5gIzvOummWqxomqCJ5Sg7GiC0MTO57lpWekpfezHKtLWXFn2Pb1HWmOnutMtHd2jOAXEWtBe970rVhB2lx5/rBj8uHVY/lW4BxMJhBKQL7hpRGTpmYa0lFbTJLjqGUkrTurf7iFwxlia+a+8kl+9IOyxBAFS0nboK78Kv2JYPKprGVd5TDh3ZtB1sVUrnkcF0cFv14g64NRYqOjavkOM19nzVMYhUEUU9BSM0pnZXhXxtA9wRsPYhDpvrJg4f8OJdpQ96X262B3fR4tg7lgB9848FDJqDz9YSB/QLdxa8WzbDREm2ufSLi8NAUEuKOnfTwcrYMzrvcLja7Ov05Lal9SEMRCbruK/CdkBRkMTNJjieAsrxqTujGq4JtPKcuRAOZ8K4lxomlLT3n6KD6VCPRXc6qQomFPXdUkbkrHrsoMrDR1389Wve5eiRX+aw7wt1hf4k6PzwHFcjY5XzskJWeFb6AGXHu3YsQbgOa+g8GIK2GKi3OAHWTzNvFLqr66RwPtpUG3CXmcUutz8teICUAKozFH5GHW/r8Xye/I1aHDu+b9JvAdimyOk2BP2p/yDVWrdMkMPyt4w8NrYc23h4oFcoH4nXBIswisNkmcd/QF/WRRAZG2ErcmzgWqr1lgjcx0o4szsePGEmvPkEOXlhvQ8JU1Aq1m9EpFZUqFjWRQX1odjGr/WlZE= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QQhaH3B6kkDq7a67sE8Bdcf9i8NuemMsubOzC9c7ieuj4UdRp61sMNe8gbztvegm6sc/Weavke4IIqPN5/cswIx1ZBlGnZA2FUB+RdC0MmRcgyF6sf9Y69zbJtN1rsV4t25fqxOggmscIIXea6TE21TFf0yA23WFKrSNuZvIrTebV/Ou37eaP/U4lO0KqNn/IsHmEk2MgKNCmZe4W9ABViqk2DlJ64mrE0pJEzQZdYFguGrIc49/15z7+jbRfH16YwMZtEP6Vwq9oiQG5kVQ8kP/ugBDs5spWZMvXJailVW5OoiSsL6puOmXiyL7aQZjh1xG5nrjwJO4PBVvwgMSkjH9dZ/hq0MmT3a5JrO4xwu7v+jbRENUgXYN1fqMkZRyHZody3OJHxqSylz7SXHOh2oHF7+cwuNESFC4UHBhgU69PSCx8AmZy91Dv6SaOubJFDJQw8yBbBaqoHw65Z4y9Ev1naDWSnvj3LlHDerSZGy+4dsGHnt9zD8n6YK/jZ2lzIWvkQRf6WqnZ0Zi4T7lfuF3wWt+NN0gYkLo118xKCfAi+eIXDBlKwpE8yaseUuGY139gHJsvEDOrV4I8LIrIfBPKYw8Pe//nIcwbtrKANnQG6E+w05+GYTRR6cGPQR50hhkUGtcZQ6euEpC33L1EFi/HgsgwCuryo7qhMPImNunD9gvDgvadZuWXiAVdDXk X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: lcTpw8OW1sz/PaYwOoIsToLTE1MbnloaGcN0032NXqtZT/WjxiplPX2mvn71nmBbnroF5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xk0J8kQt+S2V118QkjiPTj2KiyUjXMcqGPwzPcCoqkkGCOByQp6R7DNPZT02joF/+9M1aQV+OStBF7voSIDaKrDnym/OyhYQRulJZnQ7UdXHb8xS/QcPWyYK/oe1Di8uQ2eMdKkvc1hRFteXwZfdi8WnJDRSHFDWkqE+kmywD+/SACMSC8/ozdaM= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15f187c6-84ed-4c8e-dcc0-08dab39665f1 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2022 18:59:36.5048 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PRAP250MB0491 Subject: [FFmpeg-devel] [PATCH 2/7] avcodec/motion_est_template: Avoid using last + 1 element of array X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: pjYcqOp/dCI5 |
Series |
[FFmpeg-devel,1/7] avcodec/snow_dwt: Fix left shifts of negative numbers
|
expand
|
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c index f3e94b7ebb..1888697db7 100644 --- a/libavcodec/motion_est_template.c +++ b/libavcodec/motion_est_template.c @@ -281,7 +281,7 @@ static int qpel_motion_search(MpegEncContext * s, for(i=0; i<8; i++){ if(score < best[i]){ memmove(&best[i+1], &best[i], sizeof(int)*(7-i)); - memmove(&best_pos[i+1][0], &best_pos[i][0], sizeof(int)*2*(7-i)); + memmove(&best_pos[i + 1], &best_pos[i], sizeof(*best_pos) * (7 - i)); best[i]= score; best_pos[i][0]= nx + 4*mx; best_pos[i][1]= ny + 4*my;
For an int array[8][2] using &array[8][0] (which is an int* pointing to the element beyond the last element of array) triggers a "runtime error: index 8 out of bounds for type 'int[8][2]'" from (Clang-)UBSan in the fate-vsynth(1|2|_lena)-snow tests. I don't know whether this is really undefined behaviour or does not actually fall under the "pointer arithmetic with the element beyond the last element of the array is allowed as long as it is not accessed" exception". All I know is that the code itself does not read from beyond the last element of the array. Nevertheless rewrite the code to a form that UBSan does not complain about. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/motion_est_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)