From patchwork Wed Mar 23 11:25:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34932 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:ab0:5fda:0:0:0:0:0 with SMTP id g26csp863409uaj; Wed, 23 Mar 2022 04:25:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzINmbI+KXfPL/4G/m8uzwbdlPMlye5H/PjNm/VQv5jzKAgkWZmYRBDXy+VFf76t7G/XOw X-Received: by 2002:a05:6402:4247:b0:419:3c6e:b0bf with SMTP id g7-20020a056402424700b004193c6eb0bfmr16623073edb.374.1648034734814; Wed, 23 Mar 2022 04:25:34 -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 zd9-20020a17090698c900b006df76385f16si11273732ejb.950.2022.03.23.04.25.34; Wed, 23 Mar 2022 04:25:34 -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=rwn+Ey4A; 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 A58D168B1BC; Wed, 23 Mar 2022 13:25:30 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075053.outbound.protection.outlook.com [40.92.75.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D4E3968A3B7 for ; Wed, 23 Mar 2022 13:25:24 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eI9A0tu8SkNvlXQrekesUpCxFxW8ShBaKycJbN1mYdw7LyK4uSoUes/QX3ai+09l5gY7vc9n8Ypb7gmECDMBrYKtPD+EA1yn3oGZ9/Cs8g8n6iJzhhRFQXdo9X4Y3bUxdD/FxoX00ZxrG2bhH4ocMSmvArPGjeCgHl1v0rcDCK+eBWO1zcE9joxH5ClT2Bs5FCgzWY+kZtxLqgkpvfAalxHtwhCoqCpcJX0DhWgTZbRIsP4qAXp/L12DX4Gxtxz1QCmkxUcPlNfmqEZJp1xAmkiQVfSysVaMXpvLB9JEv8enDxo7Xy2pCLpjIgv5qVq1zPPHacUNI/+tzlTchuXq0Q== 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=dgUr1GoaVwvITwTfp6MXHcMXMH6LawlKdGwQ03PgD6U=; b=T8qNe1hathPnzemtxZ/hDGsMUqI+6uvgKLwfzyCzoczPlejal1XizBSYynhXZBDU5aabP8z/xEutjF2A8eNxDTVtlND06TpuPFUBn/hw2BDE4rugMONGFHyqsBCWdOWU3NvFuxyuegGeQ4hb74a0ZCf2JmfbEuJovIhQdPOmh/mVRk40GgzEtMFKP3HhsUK5PSh1QdrgE3WivZs4FEMOlYhMoYDkaQ7V3g1pA7c0eghVWqGMUuiLrREKnGe6dc3nfjDYuvCZKXuD06IPuT/THJwzibxS0WVx2+osC73/G0PxGUwOKLxHLuFQAeEfoYuQnQmZeWChId5DHmXCk+iw6A== 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=dgUr1GoaVwvITwTfp6MXHcMXMH6LawlKdGwQ03PgD6U=; b=rwn+Ey4AOFKXzVFIoxLu9u7RIpymHLQ9c48ybe4r4pTyR0Z+1TA4gBkvsizsi7+K14IrOdiT8mEHGtVBzYA7qSFtp8LT4bN+BDUlCd6kpViW+aDACNtd8PHaVGotk4+FKzOUg6v4MrMvRABYUjlVLiu1qRabibZCEF41IEMqrV0V4f07VmIqusoa0fEV5n1HOfZZCMJtxHK4lz6c3sHkUO2OF8qnzsjQGlCagwHk2MDm7q1GGRudtwJ6qDL1tGFEkQOLUF46QS53yXKr+8clAgRuBHOxqKDFLFdN1t2IbEXgx6eBK+KR6vyKqy39494cQaJGrBmQaChV13+0FIRIEQ== Received: from AS1PR01MB9564.eurprd01.prod.exchangelabs.com (2603:10a6:20b:4d1::16) by AM9PR01MB7204.eurprd01.prod.exchangelabs.com (2603:10a6:20b:2c2::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.16; Wed, 23 Mar 2022 11:25:23 +0000 Received: from AS1PR01MB9564.eurprd01.prod.exchangelabs.com ([fe80::9070:a5fd:e532:bdf8]) by AS1PR01MB9564.eurprd01.prod.exchangelabs.com ([fe80::9070:a5fd:e532:bdf8%3]) with mapi id 15.20.5081.022; Wed, 23 Mar 2022 11:25:23 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Wed, 23 Mar 2022 12:25:16 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 X-TMN: [gMBDHrVlQhrzZJtdexrLO2tXDmA6m1Bb] X-ClientProxiedBy: AM5PR1001CA0019.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:2::32) To AS1PR01MB9564.eurprd01.prod.exchangelabs.com (2603:10a6:20b:4d1::16) X-Microsoft-Original-Message-ID: <20220323112516.469791-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 62b10c66-a127-4395-05cd-08da0cbfd215 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNV4X4+euAAvR3P3exhIWKKegFEsdsXQhxBkIsGihSOxvob/2WZ8iyH/h+0R4PDNeUPC+71/C6IzxXrlGJSo8e5D2fKwY2WzK3slQL4vDuU0UBwfcHyuLjgCS6m4/VMnTctvWQb/JeufG03vQb92l6E+6BOiV6xVWWOpoPlrnEj+r65rDCzVU2qHa0zxHxKYaNLQutFweBqnUtQ/IfbKaaEswZEgws3N19iy0D4cWN/lT/7KWuxCNt75PVhhZE2EVPZZ5z2F0AHXPwgbxfScS/XbCMUQQlSd1kjW8cF3k2W+HwcT48A27kS8OtTrYhdiTUCFIJVmRScf7Fv6PeRAxJQ6Sg/04XwKBG7SvzoqQh4LOl6sJ9AqGv/LYYDhpzOpgKm70GPNLfoKFuUZ2jD2t+drDSraPcVO4RkB0c1u0a8w1VO6RtesbtKYZ1hG8ykQ9coexvvprmp0XJHKqdci1J+xFUXHM6c4YM5GJtEZ/MENScTKrl3IpZiWDSnSDERe3l0pIgv+FC9GgDDxJj75ISTAsuiGhXBam+7Hbz6eS/TSlN/sqfdT9d8v3mtg4egWhPIn3/SvQea4ORPiLW4Tg3C1GIwHhf4jy0CHzSg1ZMz4/6eG7zSOoBpvYb2bc+8FRsPWKT6mcax/B0vhd+wWSUGPt2TfFYaw5+6Db4FyAnSHDmRWw5on31lLYSnFI4UWUgWDmH1FJjxJ/Ju1xSG/cs4zBUn8S2MSu5w= X-MS-TrafficTypeDiagnostic: AM9PR01MB7204:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bQaUBAhwo8TRCtR2R35YmNgzuL9u/LFe5UPLP+4jK/4V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b0o6+SMgZtEJ2UFtUM31pN/SoixdPTy0s2sVfjlV8xiMzNh0AVp1kxQUasOYh6CyhXapwvXifaqa6ETNXssHcgd8nGvMUdW4XL/zo3Z+g5PslSSv03FlgNBp1uS5gaWBFLlSBbpdJRaznR7XA/3nJEhpMlLftQ2uTKRnfEh3ex8gVjDfvguqZkERx4lcq4JOWfT7cw4FZ6I1enRryectKzPeWszNTmVCALzqVkxfOcY8j4x4yEmBNyJz5YsIAojPM6NmmsOOJZatbVuKz98Rbc7vW5iDZPpZeddnfmFTWtgzja4YGNQD9OzH27KBcCKO0vfGgNttcC8s1mevfoC7iTTGo2X7dBKDcwWkansGq23A61JN+BxjDxvp73YBFlC5owrTs8AWidTZW517ZZr3VXHaZu+VvQxX0utYtgjdPpNj1Vb7kJZ64jKi20DKCSmqrfaqQKQO9pHwByGpLP1QXvGLkkhB5uZrvRaevYnVzP4LYW0HY/bkWRN4xjyecJNUwdsuxHfn2SSm72ldCTtLKxzUzAJS5TAHHW2Hd6EhpqIgOkwj+4U0R7ecIUhFJ3R9ciovPsNfN0hepjFpC9smipSqnA7c4/Eu05esMnSLSQuURZJBGjSMxjX4n7VrHw311BRZzo8GI9NJB5+qoUiU0AXXBBLASDo1YWTL/teLI6ff/G3ILjNlJs4kwRtFbInqHAMstxgOnBBIXHZ1xC5qpD2VE/MMUuj8= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62b10c66-a127-4395-05cd-08da0cbfd215 X-MS-Exchange-CrossTenant-AuthSource: AS1PR01MB9564.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2022 11:25:23.1503 (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: AM9PR01MB7204 Subject: [FFmpeg-devel] [PATCH] avformat/mov: Initialize padding of buffer 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: aiPKQUzixM7J Fixes ticket #9695. Signed-off-by: Andreas Rheinhardt --- No value read from the padding is actually used at all; Valgrind is smart enough to detect this and not warn about this. MemorySanitizer is unfortunately not. Do we treat such issues as real or just close them as false positives? libavformat/mov.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 6c847de164..ff2824abad 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2923,6 +2923,7 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_log(c->fc, AV_LOG_WARNING, "STSZ atom truncated\n"); return 0; } + memset(buf + num_bytes, 0, AV_INPUT_BUFFER_PADDING_SIZE); init_get_bits(&gb, buf, 8*num_bytes);