From patchwork Mon Sep 26 23:11:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38376 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp142428pzh; Mon, 26 Sep 2022 16:11:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Ub/lUzk2/U55A5Euf/Jc7clx1KiugVwSDEhPuxIW5f+lq+sORIMPunjc6/FXwPtIuGmAG X-Received: by 2002:a05:6402:1345:b0:456:e4a5:4815 with SMTP id y5-20020a056402134500b00456e4a54815mr16560853edw.395.1664233901767; Mon, 26 Sep 2022 16:11:41 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b6-20020a17090630c600b0073ce34d1a13si1105385ejb.499.2022.09.26.16.11.41; Mon, 26 Sep 2022 16:11:41 -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="ldwkdh/l"; 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 A01A568B9C5; Tue, 27 Sep 2022 02:11:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2073.outbound.protection.outlook.com [40.92.89.73]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6F01868B747 for ; Tue, 27 Sep 2022 02:11:30 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hw/gsQ1cj1X3IuiGMmCjQG4HKg29S7USDi3e2OUeAVK5U7FNiQp0JDTLMA8U5Hvuf/rKo24Wz7xHWt2fJ3VysNrqo+Jv/7jDDSlNLixJxHRmXnnHQECW88TJzwdOuf9i1In34MgfwEzqxKPJPf93LBKQUZ7NrbvdpT+ZjwMtJnuL992bl0WMKt1B+RA715uhupkrk6MeXZge8dFGC2DRkD4LkTxUWM2PoFJBo246t26eiGLUjawmzXSqIoCID6Qf9jy5k9ei65bcQQvYnVIHHcxwlIwfoSqA5xxB6VUVCQOzscjk2Ox2WBdQJo8LyGmZh00a3cAbLi048NkNM2kTkw== 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=A9HVkIbpv9YZjpdd/nbjKX24IJNvd1eLYV920a9JoEk=; b=D+9k+9qH7c1BYDa3xvvf1Xu2b0Wo/KvZJ8S/7NuMLILZRAOlMlgD/4eZDDTincICmGowyPr4keTRB8xDHQn323zRe7RqFyl4LRvUJGO8RXwILnvOu+lUkF5FI4yYCp+6JxaG9AzAHabnTLKDz5UyXpkRFNBWy+GDMpVRpxAAi45DHw4koUB5Ap1BFuiJv7S/4CqkUpGiQDh7Dd8UiXZWB8dWSWDno+SqfW4sFV+V3/fuzjqE2Q12i5tWhfiAo/wedsPGxZfV+qpOlYIrRaEg3G4ssthGFfiC4RRdJAGmZb9KtRPvR9T+kJDgoheFMHlHhNhYT+xJPsZvdiPUw7KzkA== 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=A9HVkIbpv9YZjpdd/nbjKX24IJNvd1eLYV920a9JoEk=; b=ldwkdh/lSeK8M66yR1GhVrGHdMhInAKyfsOKnekZATuWZKuac8E5U5DwL/5pSPz3C8Vzop4jnedRTLgazi3SrWVK6CEMC86phdNXiEN4abcNgal+SN6FypB2dH7lpdzoJGBg6ygXHkKRYUKzMHrSez//X1nJ8bKfH8n5rXg/1gAMe1MG2kmawk+uP9aA+c2q1H3XlPHtasxL9dcUbYAsFjmrAE/K+LqrpQtuOUC6wel5AbKF2FaIxkpc8X1v3zo9Z4E+ZHw1LSu4z2w5cAKm/GuTJcE00zyu5NRb2C8P/45U6k/cH8nripYJhdcTit47Dw865EsURLqH9R9Cme3YgA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DU2P250MB0255.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:27b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25; Mon, 26 Sep 2022 23:11:28 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::68bd:2fc7:ac52:38f8%9]) with mapi id 15.20.5654.025; Mon, 26 Sep 2022 23:11:28 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 27 Sep 2022 01:11:25 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [2VINd77/RJohMVxkzSgQZDnhDSsWZnn++yRIkuZkez8=] X-ClientProxiedBy: ZR0P278CA0109.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:20::6) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220926231125.4117392-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DU2P250MB0255:EE_ X-MS-Office365-Filtering-Correlation-Id: 853d0d77-248b-4b01-c743-08daa01470bf X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKyTZJd+JeXElu/6yZudWDRQgkpEu9nTmwiBAYUYTI5hQ/KqviI7mDQJ+1/t3ZMbLJK8StIHDBvQZMJNS3AmDn5vcoFzfEvct3/0aCfBKbO68+kDTZmmzEwoQLHNbRfk7A8wd2iPjdGzew2Oa+ZuChtwiB/GOm2UIAKOvtoL8vCj+XAzIYNCpjrzzl8DYEoRNxGpd2nQuJ0bWqHBUsw0ZgioT/p8ps9Hd3iwn5QwF31o4NW/cOGZq+EWDJOD0TCRsC9M0z2yLSA0TA9pF71mwCJz9LUA/DV5tMop8Ho4EeZMRBTbLYispoeHg2fjveFE2eTYk+QaBEqmN/jrC2YQHXFFlnKsV8Ari2dKp0+Tt86VdBKIP1M/nCmpuNuNg4TmtQdLAUwuEdtg6VfsyZnY6F1BnMQx2/CGuOcXQme2rVX91OploT4bbGMj5dacjb7sqG0ju7t6w+mD+fdkXjli81u643+ckO/b/fY9SXvzF/3qfwXxxTVXkmp1cnjzpd0NHI3vmtuDsMgG950w5cTZghuPQjWo7SvaDQRsO4QdDr00VB8guO1wEHFWQ4Mlaq8Ugn+zIeFt++m+90wfIOCtNdyu9uDm+jMgf/AfhId9QcY2NwW1eT1Ls6VAQhEIMB4kn5MqoJ0VsWHbhlQH1prxjfp0pjd1NKLKjZmPtwND32bXBOIIGndHYVyhB5iHGYtngV+3P79tY20E5nFfmcknZugtOzGHSMM11yo= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CkNzAO3YDIiKewoPGe7AcH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1iNQdJptLqYy6AhwVisA3dE4fEOl/vwrYJow//wnQ1ZbUMfQeEOQK2rsL/JH1yM3mwkJ5uPrtRe4nkqKGbJQ9mcFq3YHuHFkQUMufSLPDRfeKMJLj3A7IKIOPfGMXv3vQwFyBhB9mXkInLcJV55PaJEtiljJH/areBSqYeHGzeuyeRcTFAIvZuOgQwcpySIm41UiUJ6FGpxoi8phDff8qy683NdxVxDfJOZa2S1ToAGFMg7VHJjO5TKd9y8ijUkyOGESSnw1SlkxEvi+nqpA8dwk7MT3y+Nq9tZZcNWXJwTFsDiMEm2Q/izxrJw5HTYzsCgwKU1BlF8YvPjt3tYJGBXlasmAwKE8+cc9aqtqdR8wntLFywg5L29bdvz9eCHdiVIrt6xgojH+vQy8H8uXAH1j8RACm1/OBgNxeW2nAdfS2zIb1YAfivIFYC8jxx/3wi9KuiNtvqGA1tRWu9lCByDkTYdFFlMA9isNrj39oo+o5+BDOV4UHOcVpuQGe6tC4L5PBBU0GKFanRdSIUFIBe+kIvN8l5WRLmLfrwdftotWCEkAv2RVKWkAPJjch1LVHd6BusP19evfjC7B4SbELIWQ6RXMrcRkMz6TS3BX7C9DJn2hpRrNnUqRasiLo9rG9B0tz/ZC6LAK4UfmcqJImHnQE43WRiAbJQybqwOoj4YkeBixeHdBPtbSWrsJogc1WlcwGvx/Fb3ZsXUJfcUBSlJm3vZjw5OLLnsehX5g/2sXdo1RsRvuPgHhnWfAffyP9+gsGifUnjuGVMKpv9hlrEIh9sT2CYyVDOmtoHEu8EcsXAOkyj/06+1baXgyXr85PF0XJqMx1VznMnjmlZew9CxbEf+FLJ3umuMiqzkxc4uAjcCgLH9XujGwMpbhzFdbbroYq0so8AtHQugx9gkbs4WZSJB+HubvfOu8sxdvxY6hL2h9KR2E+ X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 853d0d77-248b-4b01-c743-08daa01470bf X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2022 23:11:28.0424 (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: DU2P250MB0255 Subject: [FFmpeg-devel] [PATCH] avcodec/jpeg2000dwt: Fix left shift of negative number 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: hYAjS/56sMvn Fixes the j2k-dwt FATE-test; also fixes #9945. (I don't know whether the multiplication can overflow.) Signed-off-by: Andreas Rheinhardt --- libavcodec/jpeg2000dwt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c index f2da7307c4..34e33553f7 100644 --- a/libavcodec/jpeg2000dwt.c +++ b/libavcodec/jpeg2000dwt.c @@ -81,7 +81,7 @@ static void sd_1d53(int *p, int i0, int i1) if (i1 <= i0 + 1) { if (i0 == 1) - p[1] <<= 1; + p[1] *= 2; return; }