[FFmpeg-devel,11/20] avformat/subtitles: Honour ff_subtitles_read_line() documentation
Message ID | AM7PR03MB6660195BB2496AC5498310178FAB9@AM7PR03MB6660.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | 8766361fc16b6d25ee8be880bf55c9761490cb99 |
Headers |
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp2089097iob; Fri, 1 Oct 2021 14:10:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQZ/kTQ6lQwunS0iUORNd6dReCywXHFxn2BTbssepsjZH9+Nui6bd7ZgzlBpFnUdy/BarK X-Received: by 2002:a05:6402:5250:: with SMTP id t16mr269736edd.227.1633122646026; Fri, 01 Oct 2021 14:10:46 -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 o14si8807349edr.422.2021.10.01.14.10.45; Fri, 01 Oct 2021 14:10:46 -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=DV0Rdg8a; 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 7E9D668A9A7; Sat, 2 Oct 2021 00:09:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068077.outbound.protection.outlook.com [40.92.68.77]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3D47F68A994 for <ffmpeg-devel@ffmpeg.org>; Sat, 2 Oct 2021 00:09:38 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NpMoraM1d+zJRTZ4ddk+o6n259LTiLllBFWQDYQHBZneRCtJ1gIFEf6TWn9qliH9vQhuWpic4iesJA/r64t4hvbXsoAT23CZQRzApOTXfsyr93WFzP5fc+u8HhkrhfZTEdx7MzgImn5uRcacXHAb7UNWXjaYzCxYgtB8pe6EVBVtQgjLxh4Wq0ebzyYa1SfQQkjutXS0XM1kxP9Biel+pEwo6Z874zYipqR7JBe/wCKHCCpPDNc6Ff1jW194WHseKocM9Vcp8UeMVYweryzX0kf9z7Cx+2xl5qOQjtkYV250JY2l3ccrN1GcZf2sdQet+JNNzI72qV5XN0x+N6/Y9A== 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=YILt5b8IhusTHX1eols8ourrfeWKeJrbiTRA40g1Bw8=; b=RyWMlCJOSDdHvPkNL7Do4r9x9H15CihGmeKEfUMom6bZmJTKkcmwIMn78R+vreSYimV6kg7He8JcjIwcM0hQsDYRolsyXuK5np+ZWQ1NwgxBFtUSRZg5K/nOCkdPbDQ7astSULjfJUXD2YI40Od3iTIztVA8nlEDcqoN6WLoe0zSM2cngxLE3YNVD7N4RzzRiHsD2H1WRljz2AA5Vw3FJoSjRomb3+EBc5cc/k+Gz3gShUw/GYk4vzu/5ksDJvgbMdrvPNXkBpxFTTJJgDCfgwoi/h+IgmgPGxLPC9Yn5BDEOahy6PmivfjONU4qCWFj8L2BdruHHDFjzhx8lW2yxw== 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=YILt5b8IhusTHX1eols8ourrfeWKeJrbiTRA40g1Bw8=; b=DV0Rdg8aRFbz4fG3zIRTeLdrNl151SQIs3UgEvSjoTYQWFSWwY/a361NAic8IXMJODJa0mNpCdW2Rwi+S5v/N+8uBI8pSTobmL3HrbWBbWxP92i9zElJvjhc4gPHuLc1CBibrAQsp71wjrkR/aDmjTidcm5roonABDTODdvec7VieOmolkudg2Aai2f1KH4IS5BIDy4DkL/244HIDJsX+XXL6fCeOYTDt8gWwtR8W5NnmapyzYgD82LURC+A2qiAqW48SMqAf5srv+ul1qWshJ15jMUXy+7/QBGvfRYk8GJTK31sWBGHdkBpCZWbtjhyYTOKCw4XyPIgJANGuZAkig== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AS8PR03MB6952.eurprd03.prod.outlook.com (2603:10a6:20b:29a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.17; Fri, 1 Oct 2021 21:09:37 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::700f:d70b:3bb8:4d51%7]) with mapi id 15.20.4566.019; Fri, 1 Oct 2021 21:09:37 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Fri, 1 Oct 2021 23:08:28 +0200 Message-ID: <AM7PR03MB6660195BB2496AC5498310178FAB9@AM7PR03MB6660.eurprd03.prod.outlook.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <AM7PR03MB6660647098FC21E8418ECA608FAB9@AM7PR03MB6660.eurprd03.prod.outlook.com> References: <AM7PR03MB6660647098FC21E8418ECA608FAB9@AM7PR03MB6660.eurprd03.prod.outlook.com> X-TMN: [NQxuSaWx29sv3x1OIX4PL4BBerv/duyM] X-ClientProxiedBy: FR3P281CA0071.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4b::7) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211001210837.2879205-10-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by FR3P281CA0071.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.8 via Frontend Transport; Fri, 1 Oct 2021 21:09:36 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a35b7af3-0c12-4806-46cd-08d9851fc66e X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UL387mJJPv+D1gZZJNbM3QQ+78WSPiJS3Ga1+a6sIplaPeYe1TvPnctTrVhRX1e7TdEepDQV3Jc82ubqfdNk3Yw1eSDKcdzqMaS9s9Bscl/BJME9caGT1jCJaWaJ6qELVY/NH9jJIcniukJ1S9Q1wFuoO1VxZ78Owo9C9sQMiZ1iVTs4Nm84bVlejR5CPRa9IP4FURVFg47VsJioNXxXsXodqWBNrEwZsmilvgIGiEZuGrwx11Z+Lcngi2bZtfHG6OlFl9tISAh51accoIgVL9CXD7UzkPYFrOc7LbQ+uQvzo/thW1+GJ/dTw6Fu225Vre+dI7SBJBt6y/i5bT/Wbi+3Ubsl/gLLyTlhXUfQ0JVOiWyGPbmHXe+psfIxcHD8CFN0wTQFiBlDPGvio3ac8p2aEh1YR7UFkUo7EdHS/F2mR2oSrzAAX08MCv+++Z1MUxwk6y8UOIs03vvsG7YS/FoqAkCy2cBNUauf7VpQFHQ58vSgjkKOxv3+VbdNMDm7KQmqa0fb1h3YF8YpH+OLnPH2fePJVA06fpgsbHj6fX+Pmms0Iwi7EN52wbXpwUfido6M98jj0CDEGqWxk1q6y+/OelDk6wsyNWGA1AkbMtN2qm2P4VSLJcOUIv1A3ee0ejWjLGWec6iOut7RTWV19EnCA6/RlsJuOlE3P5XaxL7IKpVCM3YubfjPjTto2MO2xNyk/SdOOzBzA== X-MS-TrafficTypeDiagnostic: AS8PR03MB6952: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AVZfH68rcuoW7n9DibSJlRw4BqAwUBiAG3bPb17Zl6D+AIACgKUxaIHOBAmpuN+1Q9EQA7xf9v8yoZ9vaFVuIRWJCgrMT4zFY40veVmgpBwkYMwZqpLXzHiIbL/Y5cK03sDRDfMWQbuwYL78hlN2PezCQPR1OcbbTI8yOV2cvvD2KP2l1AS15fQWMS1LL0xGickUqByI/N0Dazy4eoRa0XoeoDgsAAGXTn8HJcPu4Zm51vC7l9njF3UCtLURBOclUhIrDdxfJf2bhBdApFAzC4Q3dG4kxe1izJoBMbcEEoMO8syjVLktdER9JDZDDeNORaasZksSJzn+DphQuD0Jee5FdyghX4EQPMT6Wn7MlfOCZq7dlRwyaYxyoGM71Vx4WufWOFQjEfVGJhBcWKBPL4fxtoEuSG2awrdTH4p5EJ5jofIHGD3U88a2Q1Ul4qzv X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: t4GdAZW7wNUpPVmC2Kx3x0/mpQZVDaBINkk6qMqOxP8D1ODQFTWPqKk576vBWrcisE+ywZkDE7Swy6d5fy740T2mczTp7nBE/tIAGi3oa7cNDYgqWzmSEEtieXduofXGe2xGGd9XLspzXgNZcJPZog== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a35b7af3-0c12-4806-46cd-08d9851fc66e X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2021 21:09:37.1522 (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: AS8PR03MB6952 Subject: [FFmpeg-devel] [PATCH 11/20] avformat/subtitles: Honour ff_subtitles_read_line() documentation 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: YyMIblFHZlNI |
Series |
[FFmpeg-devel,01/20] libpostproc/postprocess_template: Don't reimplement FFSWAP
|
|
Checks
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
Commit Message
Andreas Rheinhardt
Oct. 1, 2021, 9:08 p.m. UTC
It claims to always zero-terminate its buffer like snprintf(),
yet it does it not on EOF. Because of this the mcc demuxer
used uninitialized values when reading an empty input file.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavformat/subtitles.c | 1 +
1 file changed, 1 insertion(+)
Comments
lgtm
diff --git a/libavformat/subtitles.c b/libavformat/subtitles.c index c6701c6a60..3ba5e2b217 100644 --- a/libavformat/subtitles.c +++ b/libavformat/subtitles.c @@ -437,6 +437,7 @@ ptrdiff_t ff_subtitles_read_line(FFTextReader *tr, char *buf, size_t size) size_t cur = 0; if (!size) return 0; + buf[0] = '\0'; while (cur + 1 < size) { unsigned char c = ff_text_r8(tr); if (!c)