Message ID | AS8PR01MB79440FF78671075B4A5A8C988FF99@AS8PR01MB7944.eurprd01.prod.exchangelabs.com |
---|---|
State | Accepted |
Commit | a7e8b0f360d0a7c84604e38759b24fa54e3349c7 |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b9e:b0:7d:cfb5:dc7c with SMTP id b30csp1236898pzh; Sat, 23 Apr 2022 21:40:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFpF3ej+Ujeq6g9MbKLZ9oQXkB8IdLt2OisvoOVW3gQ9QBgNEfWiJTZSixp2QN5k+p6N6t X-Received: by 2002:a17:907:94c9:b0:6e8:ab67:829e with SMTP id dn9-20020a17090794c900b006e8ab67829emr10527620ejc.313.1650775208356; Sat, 23 Apr 2022 21:40:08 -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 kf12-20020a17090776cc00b006efd8c768aasi9544514ejc.405.2022.04.23.21.40.07; Sat, 23 Apr 2022 21:40:08 -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=joYNDDcV; 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 EB39568B3D9; Sun, 24 Apr 2022 07:40:03 +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-dbaeur03olkn2079.outbound.protection.outlook.com [40.92.58.79]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 55B4068B08A for <ffmpeg-devel@ffmpeg.org>; Sun, 24 Apr 2022 07:39:57 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N8+Jk9k7zMK2lADWFGU5l4IMXQ6VsuEPMBXyeym3vUyzMhgRjAPSkkye1e5MUdEJqTxDM64sZno9iIe68rlhxhDkonfdcmlDKsFPY5fARkERHNheC4sj7bMzj15TJRfLQ5pKtWHENk62StekuZYki6oRnMUhboyj4Sw0cIPLbEaYxx77AX5moOKaG3r/iTr4CqzSbXZz9EGEu+EDGl4TOFsNvn5SQ+KlKK0GnU7DHejXotTtYyeONtaOH98Fyq7tguphieZz1IH5xRLHC7AqhvX6H1l0207dfFZAbbcVJK/oAKXXR7q2WE43hWuma7erYbQHwHEeSb5IYNTMjOeVcA== 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=Nzn2Z+Nd+A9yGeLOeJd6FcZrj8wB4C6DXcqAAF9Mh+4=; b=fzz3bL+z9GPIWYjWlZsJRj5AVD/Vwuvjfctq34H4wn58gLR9kpsQvreIAvJCeaXrjfHVn8hl+nGtcink/HldvA4Gv9sWmkPWb2flTZJYGva/qnqoCKRIUlIcy+FnmOEWQPfMyihsdRyy4JTBRFyZZeBnoiT0L923U0z4+XbN/cBnR/RhCXWgMzlhseV9CSwjTC7uJ8nP/yQ+I9Gsz5INCGKQxUh7EqfiLjdb0pGju9BQBccbASFV4Nz0Yix05+JFqeVJfL0oP5tO17icXmogNZIPfQSuQWoV0SAlGk2osVTfi04ZVZZ9JXXNyAhxbcV/E+D/R5HRJVzi9VY1fsW9nQ== 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=Nzn2Z+Nd+A9yGeLOeJd6FcZrj8wB4C6DXcqAAF9Mh+4=; b=joYNDDcVTseWBpHlxM9EH1Oe1qgcqf79ruflmyggaTT6RQ1cUGon7l3FcKaoE8f3pCXpsinh5S11UuFM/KxFOwPU15DxUZfOeDnG87FoBN1Rf/8rOb3btvN8sWrz1OjAS7q1aqR3H+keq2bDEecwU/JFJno6t7lZiAM++HA3GwSw4pHUsM6XAaPMeAFnVDpbQKhD0po/b48wz1gxjFHmUWRi1dLrGx/73TLzZ7reVWkTdxTPEVZ8w6g8rm1LigIhGvZpuaoYIACpkeuG54PqE2zmNLzEw5vglgTgm10XFBz7GkB0kqHLRln7e+z0IRLVeQWTPxWi8cX0yy9f60Nt+Q== 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:39:55 +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:39:55 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Sun, 24 Apr 2022 06:39:41 +0200 Message-ID: <AS8PR01MB79440FF78671075B4A5A8C988FF99@AS8PR01MB7944.eurprd01.prod.exchangelabs.com> X-Mailer: git-send-email 2.32.0 X-TMN: [daHStQtFDQyHfjQQrLOdQV4kkbx5gvwN] X-ClientProxiedBy: ZR0P278CA0085.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::18) To AS8PR01MB7944.eurprd01.prod.exchangelabs.com (2603:10a6:20b:373::5) X-Microsoft-Original-Message-ID: <20220424043947.887816-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7dd33fe0-6b5b-4e50-58c3-08da25ac7aba X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiT4+P6zBac8z1eXEhCqSjjDxgl7UOo1rTi3EAQQbJTpex8x5t3sr2mjRVdf8C60/rkGslGyFqXSOQq5Py3T1zvglnfE4R5l9kppjlIGOC7SVn9fiIw58OqiAepYhc2gAetnoGfaxNJUSepLMiNEglSM2Sdz18qgzL90fHcXe3kgnSMwUX2VFwteXp/w+zShmpw2bZu1KnpIUUtjnqzHUWCFr8cYOs3kiiHIiqFU1lwO7a2ZeM+tsuHXnUq7kr8NokyivS/0QQOd7ExhAOdRXhZgaXWvBQcQCKc8aQuTtz+J2EC3ht6H68kH7BLKcCE/v0B4+F9Ks+vc1y+UN6AgDLrnAySKX/O7obNvnVY71EqYM4evY+/orzzuiryFeWWAwLwvAzoM1aXGMvfuDc09sobMERPlz08DgSiP0PQqWnfrh/Fh/6lEr7KkQ6JwUe6x+ZpeXUw76QWmBNuvH4D/zas6gGrlZdzLokBcHve478QaXOr/MaCdgJWEZAYqi3ptfFrAehXTrQM9zLW0TCOweCoe+zP0QXc48EXgOUs7a0di0GYSJSGIJYYZQ2Lw4E3FnMDyCX/RjRJG2Yq2bIqzrDtWOYYSu2YrFl3pyU1Y4ESSO/1/oxdoR1bxWaPJNIc+Xgta7Z9RN4LzrTKZ5JEmMmXXN4aid4r3jaUEIoaK6PJSruWb5N3RZhMo3vpUnlS0H1kKgPTu6aCmI8lJai1cE6X/gBQ3YO0Qr3eye2tZ64dwet8H/XbPF3cd6tOauKwKGFc= X-MS-TrafficTypeDiagnostic: AM4PR0101MB2210:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e2H8VQrF38N3rRAk/DDL7eqWWDmzEYghwtl1NgcWW/Bvag1bur5+CsRtevvKAhBd3slpPCMJzlAdTof5bqXD7F+g2Xfmq14duDaRj8adIDNXxV0Cu9Fdn6oVXDwFaxkKd8GKttQRhZ3dyW1+AW1E0jMeFKgxP4znSPsCNd4h2npNgG8xMkATcKh3D92gkcbMODyF4VSDlntpnXQP/TJ2qC/DLdRCZZX87Qr9nPVQMWJLfIfCN0Q7yB76CtzdTmygWQ5At4VcBeIK8BkNMfCjKv/TzPLc1VYFwuAWorO3jMLU5IDlIM5OGTE9sPmH5NrD2/V9dj89UxDRHW1HOeSOckdGg2xS//WCsYMJidpybJQToZJLz4yP/bga0bfbgRl0p4kwJD0YAGXBUf2EZ5xYEa6onzc0sMikDRsjb58Oj5fVEnOk96Na1F4I7T+LWpAmoqvPUao4qCBarHaEs0Z6DuRvkVZ34XqsgIStblhTLyxXeBkmc1N7BJiBot7JVQqQh0uQ0x2Lf7t2y6BKIQP03A3TDnnBy6DPwM3uLBVEO0Ullfjse011cJY+Wmr9gl4kWgqkyr7v3DKXcwj0dqZxQA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bUBgyKeJ5a6tYb597K2rn7gsohy9dp4Amtx+BB+J8QSVXeG4vNTneAT57tJaVdP2sN+m6c0WFmSzO6NXbY9yvhdDe92IlZ27yZFBK35bGpDMAJkWhn7t1kmJjrmYRTl400qM26yDJulFWmUDVOLavfvV0bhssSnVkhK+Uwla8Oha4mM8Av4OXfLchVapJdgiamzg7o7baSkk5rEclyWNTgXC9p5GPx0wIUHeNATsWNFT432JbjVlInQ09VXpZ7+3vDCu+aKfMIYtCZorIVI0m61mtQLs2D6EUcdLxhMm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fIQTLu0wOYLsg/FoGM4PleRP8G683CQ0JkgGmxQX0C20J00qoI9fmXZ6IeqZE6hxr4YP2qtgE489/BMnZzVGFvGviM/RjNBhtfkTg+Uti9gKQAYA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7dd33fe0-6b5b-4e50-58c3-08da25ac7aba 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:39:55.3273 (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 1/7] avcodec/pgxdec: Make better use of size check 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: qhmCyTJ6DFoa |
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 |
lgtm if tested
diff --git a/libavcodec/pgxdec.c b/libavcodec/pgxdec.c index 899e7a9994..154a683b4f 100644 --- a/libavcodec/pgxdec.c +++ b/libavcodec/pgxdec.c @@ -56,9 +56,8 @@ static int pgx_decode_header(AVCodecContext *avctx, GetByteContext *g, { int byte; - if (bytestream2_get_bytes_left(g) < 6) { + if (bytestream2_get_bytes_left(g) < 12) return AVERROR_INVALIDDATA; - } bytestream2_skip(g, 6);
Each of the three calls to pgx_get_number() consumes at least two bytes. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/pgxdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)