From patchwork Thu Jan 5 20:58:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Angus X-Patchwork-Id: 39887 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bc95:b0:ad:ade2:bfd2 with SMTP id fx21csp663975pzb; Thu, 5 Jan 2023 12:59:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXv/ftHdwq/MRN47V3WERss1d2PXKgRIEnxsGVpvWKSd9bylSmnF8j2BHFm529EI1Q3GE6wc X-Received: by 2002:a17:906:85c2:b0:7ad:aed6:5224 with SMTP id i2-20020a17090685c200b007adaed65224mr45829413ejy.74.1672952349770; Thu, 05 Jan 2023 12:59:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672952349; cv=none; d=google.com; s=arc-20160816; b=RZvNmxk05KI7gOxR0Pn+eHtKTDbrg3g77GKKQ2Ix4gxidDm5O1aavHQmNGnH9oi4ka JWhmbUbA5EQxFSthGSh4KrTYuN9mIBf7AJwpfdlwaBEZdvAGS6q8YGB4uCpglU4mrRg6 HkICK8CsWRN6JfY/nFADznAZ/yGCZOZSoPTNeQTs53m6YmxIziNP4dHFBUvOstg9d5Qv cI0PE/IQ3w1k0U6snK2ZEWefEpGABN+UhYwpfFxnuyzXI/nEu0F1rFFk4WZOOWVq9d7R xifk8rtXZE1/QCw3cjqLog5TzvQAffKVOBlS9Kd8y2eQkD9/1CHx2w7aH+LpoklqFKKm VjtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:delivered-to; bh=3FuuGey8n9VjmmA/Jn3UZnFb/+Vs+1a2xEICpt20cyY=; b=RZTE3aQdCIdPse59zau2O5YuH31add6H9HgTM/iDbrVXCznvzyQ4Ghbx/Pr9TxCDn1 8Pv/F2jQgiakqwW6TAXMwHyHuFGlmSpViRqOK/cjEeQa7CTWFiszhqkGD6qjx8L0tLub tsxzcYKwtJOhNrkiiAm1Lj/RoQbiFGWCcG1KcIt1BGvLStxrXVxuA2SUPN6q5y92MrHE YrbdstBoZ6ZXVLZuRX7lpDVanvO3PepLHUpVOJAzkyuDEAi2MjYKMWkwXxW85SVqTQne KhiUqPoYRU3hiPGeXVq+dtt8bZF4NEIoDMWAz/1LLPnWbEk0yTYCRdX1S/vPgvIp7Kdi WHrQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id hq28-20020a1709073f1c00b007d5291a692bsi33709093ejc.260.2023.01.05.12.59.09; Thu, 05 Jan 2023 12:59:09 -0800 (PST) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CCC6568BDBB; Thu, 5 Jan 2023 22:58:59 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mailrelay.ngus.net (mailrelay.ngus.net [109.237.26.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B058068BD9C for ; Thu, 5 Jan 2023 22:58:53 +0200 (EET) Received: from cpc102338-sgyl38-2-0-cust655.18-2.cable.virginm.net ([77.102.34.144] helo=zebop) by mailrelay.ngus.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1pDXK9-009y7x-0h for ffmpeg-devel@ffmpeg.org; Thu, 05 Jan 2023 20:58:53 +0000 Received: from [192.168.101.3] (helo=localhost.localdomain) by zebop with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pDXK7-004AX4-Ex; Thu, 05 Jan 2023 20:58:52 +0000 From: Tim Angus To: ffmpeg-devel@ffmpeg.org Date: Thu, 5 Jan 2023 20:58:42 +0000 Message-Id: <20230105205842.1442824-2-tim@ngus.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230105205842.1442824-1-tim@ngus.net> References: <20230105205842.1442824-1-tim@ngus.net> MIME-Version: 1.0 X-Spam-Score: -2.9 (--) Subject: [FFmpeg-devel] [PATCH 1/1] avformat/assenc: fix incorrect copy of null terminator 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: Tim Angus Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: FjoKXxtOvzBh Signed-off-by: Tim Angus --- libavformat/assenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/assenc.c b/libavformat/assenc.c index 1600f0a02b..07b6e3a171 100644 --- a/libavformat/assenc.c +++ b/libavformat/assenc.c @@ -69,7 +69,7 @@ static int write_header(AVFormatContext *s) ass->trailer = trailer; } - avio_write(s->pb, par->extradata, header_size); + avio_write(s->pb, par->extradata, header_size - 1); if (par->extradata[header_size - 1] != '\n') avio_write(s->pb, "\r\n", 2); ass->ssa_mode = !strstr(par->extradata, "\n[V4+ Styles]");