Message ID | AS8P250MB07442F1C47B0066F448497648FBE9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM |
---|---|
State | Accepted |
Commit | 43991dbd0557cd4142e90d0d9698c7678cee60b6 |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:d046:b0:cd:afd7:272c with SMTP id hv6csp2251378pzb; Mon, 13 Mar 2023 20:10:18 -0700 (PDT) X-Google-Smtp-Source: AK7set/0XCKQO/qEMowBDsaWtKrKub/wXDlKcPe+lFb/HkJ2qRBCur3c1fshpQTIq7dP0aGdS9Q6 X-Received: by 2002:a17:906:4f8f:b0:88d:f759:15b0 with SMTP id o15-20020a1709064f8f00b0088df75915b0mr1081591eju.45.1678763418698; Mon, 13 Mar 2023 20:10:18 -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 de23-20020a1709069bd700b008ceed901431si1277283ejc.360.2023.03.13.20.10.17; Mon, 13 Mar 2023 20:10:18 -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=SZr4FgXG; 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 1A73368BE03; Tue, 14 Mar 2023 05:10:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04olkn2027.outbound.protection.outlook.com [40.92.73.27]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2200B68B1C4 for <ffmpeg-devel@ffmpeg.org>; Tue, 14 Mar 2023 05:10:07 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eRXThmKoDnMQHdhEZ+yqIv8AslDZB2L/5AM5V28C43LB18cdIXv4vcag7E5lZ4Nl3Wh7Mj9y6cTUapo0c2LNXnrK6daRAyrpVknRcOtFNRTiE50/r2tE0dqR8egJJ1AxMJfdYoVwGuVvPyS7dEgIqo9aKAeEPTH+g41nGw4B67PKywnpXtgds/iqM9dtZrZWZTwKMNFGbjqLaweBgwgP6qbZVHF4InNC4bEi/hH261Hp2YqwRIhQB3eK4jzoR6m7LKZWIsFqrrlkITXYRT8oTYzvsNlOoFJBBI6BWCiewvsXR5G68x+BAg5KQ+MXAWB91YHK+/h5MyiuTIhLtt2hoA== 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=m4O+gvQRdwczetdH2lTWgk+aPJ06NWkwbkyr8J4m92g=; b=Fvb+fGDkcRoEpmxv3x5pIn0ZVXlHiqCSfVfrQtSfPgQ6VfjpjvVokWkGHlx0sugFnKlBP3LIQpeIia+sjDN7lgdrBZ5yevpntw8JJv0CdDSOjwC88NLAwLMVqakmeroka6GZDG4NUaTKvQdTEheQ8ixnl+xdcwEZtpW7CxwtgAYgMtH3tBfS8aF0wRv2tnuU2KrfAnfRR2UYUhaBg86qB4quOOZvTvXWUyf5PrjNAq5gQFNQpwx6ldUDkiNJ6FfLbghgC2xAhVCbtLFelHB/ZPg0nbw8VFBuK1vHrv2HRWxNzCtWUS4m7aATAsqLCK4CCRTt6QWPKXyC2FbcQ72udA== 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=m4O+gvQRdwczetdH2lTWgk+aPJ06NWkwbkyr8J4m92g=; b=SZr4FgXGV3YHlSdY4g3SRBHhmb+WG8GcxQlnXqO60PW8e2q7JZJE1mzEnuKEfusO+Y+UV+T9Q2e2h8htvtwtr69zNhvgRyUq28fkmPrq9ZVt2ZzuS7+SsuYM4te3DfbX+p2CKtyRK407gAf0cn2d/dkBq1FPmY9Hd9vGy2DHAetE66d6ohJT2a1iVgEACI0BzzmsJ653izOXr4bjbc+cXHc0l/ZW/n0VxJaHOPwymBcrh6psDplkoqpbkTsB3wXsBBZJKYM4JpWRniKOl7JJxtqLnVnOCxyYmlgy1ZaHoWLCFj8eapU2Qd4xgR2t9r+Jkzaa6sprd+MvKxS0QxbU1g== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AM8P250MB0246.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:329::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.24; Tue, 14 Mar 2023 03:10:05 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::73a:bd4b:26f3:cc2b]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::73a:bd4b:26f3:cc2b%3]) with mapi id 15.20.6178.015; Tue, 14 Mar 2023 03:10:05 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Tue, 14 Mar 2023 04:10:35 +0100 Message-ID: <AS8P250MB07442F1C47B0066F448497648FBE9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> X-Mailer: git-send-email 2.34.1 X-TMN: [BMM8YGLkeOiQzc3rTtndiFwIlFZGRaCYZcC23xPeDEA=] X-ClientProxiedBy: ZR2P278CA0017.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:46::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230314031035.1428719-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AM8P250MB0246:EE_ X-MS-Office365-Filtering-Correlation-Id: f054b657-7b55-4116-1a13-08db24399c13 X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKz0HU6CvfmlHmreE0CbozhA3aWE9yutLbK4hT2Lx1apFLAQ82hjMUkkJdzRSTNritXCeZ9KiWh3wgLq1L6/qfhyogIDbVwl6HWTbkc0t5LL8l4OokHUG4iiqWhnF1KypV39o5N2mZ7Iwl8LX6DpN1LzoJhobAn0OgscK3FXQTTE2Vph5/pspkB44TWuPzE9S/KsDIBOq4C0IlkY1vDkGBX7YBq5S5oM6I+xQyXLVNuX8Y/EM9gt+1aU5hJHB2aSynnHAa29i7me67r9DmwXrtfDzK4cfNCw6Xkf8aQGHf1KRRbIIVJwnVY3Ve2BdToZ07/R+mjoabGCLdU95ZJcKNYyoQPYIFytUo2hTYplb5VH3ZsSLwR8y14JeE3m+/n40fhAB9ePY0J5YF3JI7LgA7D3Ou6g7gtgT7SgkO61aJ3Ud5SVsPmMeT+/Nj8W4kgoiBaVC/91n0wplnabTtWLONAmcUKbKfplnwyGqES1QfJ/JoX8E6g3M4sC1/4yRQZXZ06iuvpyBitgw9Wk3HzA5hifG0GymwKt3Q97ZOhYUZQtTXOzWCuB3MNffA9FOexcMJlulTWdgUfoICZioIcqpC4dJfvI4hlsHOPyY9jkuElnkbEzWZDv2EjOXgmSUQO7X+UVd7PRuydQktXICI9X1HepeEDnnvB1d1OmvPbQfJFNtGuQg/NmXh7hwMw3tBkEdSmGnF6dnxdL979Cr1+ns22HosP0ptl41mM= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: glge6zfzxAvLHD5smCt27JWZ9TxZFWGJQfozeFpBOlxeFJAN33whkt/hHm76N4kgUDjfBlYo968qI8t3QSZsk77EMctAvaaOpcg0fu/95Q97ppKyCpcJe3uplohcUa4pLFtrWHDD2rR0A2gzqwgTkl4Ex3GDhK3PvYI3HlwvHZateZ93xEHzQFM8Z3vi0jYNcnNRHLMcW70eQqq2sPNtN8B970KfLLBfuVnAvlQ6q5gti/oe+EPFD4ZcmM1zpEr1hmo6KrtnWrRhNcxsRq3q5n6kx29oeCUzBu6EgNeBpXym6HZOfwJKfUtIc+EdLEjLOw+CmPYu0/0grUEySC4LbAF12LD2nKfJpBiW4WfILH863T0+xU7EOMNTw88br+bZ1fB0ddGC6bfwL3UGTZGRf7MpK4cgKHAPbiWuzNUBUNGVZrDMOvYMyvaxAXmbhlD9TbyXyti1aeZTFiTKqcuYvVh1UGAmz8oIO4ZNfNILzqFVQmf1C7pYKVO4tR3vCA544NQnqkwWLWAx80GSdMB1FmQkd1AGJO3NNLvFDZI6BqhaU7FHxGTr8ueq8A8Pi4pA9+a/ZZxugzDEesR2AlRwrf5pOViRenqBSiIuQx3y/OmjLYMgvUhx5glDXKnYvKwO0Iu0WetccRHz9d+yYc1m9w== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NHjsM5YuxdgB0HM5hfZ/epP1p/ljDkYlc1HklPLz542OL9cPOtG5Kwmq1Dg8ERqzWrXzwuy8Ldbqv0oEPFoLiDKECxXFalA1dyw0eL5+tnQsau/QxCZ2LcIZE8eSjJ+zGL45Wxk5hD+y7iuUDBIJvVroffMD5WwSDG/IdTu9oIocNpI4uAo1TMNWlmXiAcia0zj0khg5pSm1m7myA8FX7lD6WK+Zmj4MYijb7XBcF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4DxppTSN36kzJogc= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f054b657-7b55-4116-1a13-08db24399c13 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2023 03:10:05.5731 (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: AM8P250MB0246 Subject: [FFmpeg-devel] [PATCH] avformat/assenc: Fix potential NULL + 1 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: 6BunZuTbDiBk |
Series |
[FFmpeg-devel] avformat/assenc: Fix potential NULL + 1
|
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 |
diff --git a/libavformat/assenc.c b/libavformat/assenc.c index 85a1e53371..a75f458023 100644 --- a/libavformat/assenc.c +++ b/libavformat/assenc.c @@ -63,8 +63,8 @@ static int write_header(AVFormatContext *s) if (trailer) trailer = strstr(trailer, "\n"); - if (trailer++) { - header_size = (trailer - par->extradata); + if (trailer) { + header_size = (++trailer - par->extradata); ass->trailer_size = par->extradata_size - header_size; if (ass->trailer_size) ass->trailer = trailer;
Incrementing a NULL pointer is undefined behaviour, yet this is what would happen in case trailer were NULL before the check. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavformat/assenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)