Message ID | AS8PR01MB79441EAB2E52898C305280F58FF99@AS8PR01MB7944.eurprd01.prod.exchangelabs.com |
---|---|
State | Accepted |
Commit | 67f796050519a3a3f1d52c6b054d3c80b8980cd2 |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b9e:b0:7d:cfb5:dc7c with SMTP id b30csp1237705pzh; Sat, 23 Apr 2022 21:43:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/aPuB7vQcgB9jSbzpLMbVcdkXgR/V7A4Q4y+kXiTgeiEXPBUGC04ern1YrBLBgUaUevxf X-Received: by 2002:a05:6402:128b:b0:425:d1d7:b321 with SMTP id w11-20020a056402128b00b00425d1d7b321mr6074147edv.179.1650775406919; Sat, 23 Apr 2022 21:43:26 -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 f1-20020a056402194100b00425d5112cacsi2667689edz.390.2022.04.23.21.43.26; Sat, 23 Apr 2022 21:43:26 -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=AFWHeLLi; 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 4CCB168B424; Sun, 24 Apr 2022 07:43:22 +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-dbaeur03olkn2093.outbound.protection.outlook.com [40.92.58.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3A5BD68B08F for <ffmpeg-devel@ffmpeg.org>; Sun, 24 Apr 2022 07:43:15 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f4e2eNupkiBEe3UQ7m/1AtXk5dHYwpRUE4adhPW8JiqbFJhvDpP6E+2WhQfFtYguCqSBUJ0p04PZIvRsHsh3yN+j/nLf6E6kbvV2DZQFYnYd0dpFs642RJhK7qyeGsZdPfnwn6sLS2CBSU4y4swtj4vrtYAgBvmaGW9j91OiqOHR7DNllFa/UaZZ7cYhak+BqMYnY1fhUxpCGVfu9oWBBXJXIVjRWnFo0r4Wr/Ax2DRDqsjkR8xcDmAou+eKkz3U2NSVQ1FBkvnqPtbrZZoVeHR4GQLOqdyuuBMGGrAgxZ4KXeiNKtvlTRL6ndPtj/aBSFhPjg5vOdWPVTL3SOtfqw== 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=Htnwa5KzrDe1v1pIiYSH9nGjmjNE9Yrn2dUcN+fgGes=; b=IFbfKW8/+UZEqYYi+yMxX8SMbnIkT/CjjMuORugAPOQYW+szo29f7ot9yMzEEr0nYSZb0yY5s8KuyAVkW8o2Zm06rCWN38tOYOqNwB9fjFPVpYSpOyS8+nuF6D7fB+shCbVFfu4RiCvXHvJdoSpxNCUf316k2WMI37sDtjoCX9nSqZdU+alTROjFxmf2uf0oozD6vlYvAkgECX/9gcx52t1K52ZO5VUmN6b+SydnDEZEkdDcjN3NhhO8hg67eRXpv/eRyTgQtRC8woBM2mJyJCvvUpEBtrnMb6VhAWC4Rt1x0mahT9O1yrJ3cGFXJxyziHL53vQAu7tH3wgZHVq9JQ== 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=Htnwa5KzrDe1v1pIiYSH9nGjmjNE9Yrn2dUcN+fgGes=; b=AFWHeLLi3H3RrbNT5lQYzBJrNqNzPUT/rE89eNM0vAufBRJ6toz0iQLRbfzAqHhcUzRQrE11LsaD5h7BlFeY9h8yhdRbHQYBRTRoTvChwlOOEXgN/zZg82QMQxy8VyPwuZRQAHPJDpu92xD5PQu551JuRHEHMb1zOmJ4xI8XLMAhWFn3OwiRzuOL36Wol6yUeFhWF+jFrTtxnLujAgjLcqmpO1FDdGwApKGoyiDg/Ii5rJO0vUeCDBnAygzMPSf4aNTaC00i8YeB8/sBx5enUZSG8063B8sBmLoZ8PRrsoTUYGCE5Tm8NjAfbLIMYkPguw5OiHpbjShNbEet4dHE9A== Received: from AS8PR01MB7944.eurprd01.prod.exchangelabs.com (2603:10a6:20b:373::5) by AM4PR0101MB2210.eurprd01.prod.exchangelabs.com (2603:10a6:200:53::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.13; Sun, 24 Apr 2022 04:43:09 +0000 Received: from AS8PR01MB7944.eurprd01.prod.exchangelabs.com ([fe80::1854:2c30:7ba1:c431]) by AS8PR01MB7944.eurprd01.prod.exchangelabs.com ([fe80::1854:2c30:7ba1:c431%6]) with mapi id 15.20.5186.020; Sun, 24 Apr 2022 04:43:09 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Sun, 24 Apr 2022 06:42:54 +0200 Message-ID: <AS8PR01MB79441EAB2E52898C305280F58FF99@AS8PR01MB7944.eurprd01.prod.exchangelabs.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <AS8PR01MB79440FF78671075B4A5A8C988FF99@AS8PR01MB7944.eurprd01.prod.exchangelabs.com> References: <AS8PR01MB79440FF78671075B4A5A8C988FF99@AS8PR01MB7944.eurprd01.prod.exchangelabs.com> X-TMN: [89AUxo+eDLPjcuvpq4kdHZJKDhYUArKi] X-ClientProxiedBy: ZR0P278CA0069.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:21::20) To AS8PR01MB7944.eurprd01.prod.exchangelabs.com (2603:10a6:20b:373::5) X-Microsoft-Original-Message-ID: <20220424044258.888081-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4c883bac-22d2-42eb-41a5-08da25aceeb6 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UL9mvhPTGbvwy9cgLHAFHXfx7FFJ2ZviRAYWFQIJDClrgO6xxNp8sDFaTLTzqUupMOwgFO00WRLpwv8yLRk1BiR/2CBlFgT6Ar/lr94TtbaUXZ7r5+MtvMWluqngTPR729wF64Q3Vk8RwgJTOHLB3hfyndlZyFNP+jx6wlRcV71JjYS4bDlOzAAxDLs+E0z18WfRHPhx+J/JmiChH7gz8DDUwDhfppgSjDhzM1Y0wWclHKdrFkyEHdWm10d/OU5YyYGGSVmpTukGRCSlC5J7aWlCzukllWdW43vrNw3HEie1zesvHswAEclBPTMgQXqdQmh8fhWiJbEU4SJrINERRln4b5Qyzvgk0idy7mzAw/RUJt/grjPB1QU8mTV280RlN+KG3A6byM9DOYlp3HF5ITotaey1Kk5/+gAhrfHtvbOg7Wr9vYgHcXH/bcpEIwC7QkqMWZQiXPo4DwM9gZyILyOF1a2Wza4x4BuZZvpR0WX18+eXm+b7GPHX+yp8Q9zEFN7OPG6f48P9imbvtuV400vBq3oWSj7NEkOTS9NFle864x9nrIoNBk4f2lbV2A6zwD5AHcQVt3+mQ2TUaPTYvjrsdm3Wq5nzFia5ZMtc/S8YFe7AvOKQ+qzLe1yv4O++Mct4mugBwEXlsUXt5qXyomJXEzlxr+DTMybhnrKl4x3PCzSEmcL0ukpLyOsBytTGDKvsRF0/I7yNg== X-MS-TrafficTypeDiagnostic: AM4PR0101MB2210:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TiF2VxtjhlF9Hgtvo1k+p2bm3mjZ6J6RcdSPvlb9f1rrIZFm5F+pJ9WBM/+EXU5ArxpWQcbxPHisBWp2KbUOsAo/bK0KnOcSAzjaoLiuNKLPPYid+GXrRbEuityanR0+eKvm/QCVstQxj6JcBIU7iW27pQpUtAEdN4FEfPv5bl8+/Ih/uxTWHRrqKiZacbMpEdSAP9BDqo94yrPqjwoEFUsan7gJm86ixyep4jNwvehr86RLNM2hBGUcQ6b7ZTAZZbT5AKrp9XMkb7uBsJ/lYjtDVl2ygmRBdjyPwYvDK7+Xiccd7V0zRD40wbjrVdr1aJuk01gCaTpOlFyEQRoZoyLXEDMDuNIK0+FaziVrDze5KoKUcCCDqIBRRJx+5y5OogzkxvbgWGwwrhAkllV0Aa+zam8P9Vv3+DYhmgkxhqiWJVF/cL4K+gEIt2BHt7iRRWXDZZzkeZF+bH3WEy03j3XGyqUltrNW1pOqMJRoBoeiRkWJbFFEQl0mzRnOqjjXUZppTVneO6P4RdP0wbA0UopeDJWZ3i9U9UY9ilhr85cJb8lc3nHMV4yPQ2JM4d0Ey4KVG/1iBMS6jUdkBrWhcw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 80nC41Sy5tnF+g+JxYRMs3WU7B785cAdSZwcfsAL4kpkoKO4uqmeI6BimEFKGldSRf7lhIwTzP14lZuRjcDueOPfZ0uNtTPPHS0mVISusLkk1s3NqPfYip/QsEseyYhYpzqSmlXqrUSgUp9An2MmJRlFYRqwvQRWN+2uxOAe+IrbjJTMretcilU9K5Pln9gFJIiVpEyRhD6C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oTl3MpMD8SbKd/QmQz4UWRjIWD+K/QyYy2oNz1v9CmNlDX9DmTt6xQw+jG3pe7fGdWzgcThe+/y+JaBIBCUuZikmWpj5Yzg5nUK2jlcNckOAYpsKPKAFkctlRo7UVi63sqKCDTd4BY77kIWdUqhQHalx1PuFbJQZLROevLxw6HVwsSoVGhrT+uFGZR2bFcOkR5ksqDnF6P9nsjmg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4c883bac-22d2-42eb-41a5-08da25aceeb6 X-MS-Exchange-CrossTenant-AuthSource: AS8PR01MB7944.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2022 04:43:09.8057 (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: AM4PR0101MB2210 Subject: [FFmpeg-devel] [PATCH 3/7] avcodec/pgxdec: Remove pointless checks 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: ZMtk8DpwjVyM |
Series |
[FFmpeg-devel,1/7] avcodec/pgxdec: Make better use of size check
|
expand
|
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
probably fine
diff --git a/libavcodec/pgxdec.c b/libavcodec/pgxdec.c index 9c474036da..c9ada5afb5 100644 --- a/libavcodec/pgxdec.c +++ b/libavcodec/pgxdec.c @@ -69,14 +69,11 @@ static int pgx_decode_header(AVCodecContext *avctx, GetByteContext *g, } else if (byte == '-') { *sign = 1; bytestream2_skipu(g, 1); - } else if (byte == 0) - goto error; + } byte = bytestream2_peek_byteu(g); if (byte == ' ') bytestream2_skipu(g, 1); - else if (byte == 0) - goto error; if (pgx_get_number(avctx, g, depth)) goto error;
These checks were (most likely) added to check for overreads as the bytestream2_get_* functions return 0 in this case. Yet this is not necessary anymore as we now have an explicit check for the size. Should the input contain a real \0, pgx_get_number() will error out lateron. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/pgxdec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)