From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 60A98468AB for ; Fri, 23 Jun 2023 01:02:02 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 38D9B68C173; Fri, 23 Jun 2023 04:02:00 +0300 (EEST) Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3B89368BE52 for ; Fri, 23 Jun 2023 04:01:54 +0300 (EEST) Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3909756b8b1so54773b6e.1 for ; Thu, 22 Jun 2023 18:01:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687482112; x=1690074112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=LNiJiyWkm+a6p7HCOIR8ZATdMcaALt47D7Nz0vXR5T8=; b=VPLvFhPXkH76nTTVZ8SKIaGMKrjubVAiQgGo+Skk4Pf/2nXCnHRA0lj/XYjaAWRHoD Ifw2/t88IQ9bIrKsdOIE7J04QBY/8LjTUwK8ozqLvoWJ1y4wAB9r1dAH+8wBk9YzprrB tBtjv+ktW5ZPZymOSCYQ3MkfSD5eulycrVmWV2050F6lQFqHmrmpgqw7BiQwFAJiw4/v dGpq9OUdrBAyo9tas7O9u2iWzDkCN33pIW96xuJGGhZs5ZT/shrOI/UqlNPiTRh0ZL3u zvBlJbEiTxjk0qAIZXrongt4+nQxQLJpNyq6b5jPAhNlmbJkjy2nfQYOLzp51vfZIApu 9uug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687482112; x=1690074112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LNiJiyWkm+a6p7HCOIR8ZATdMcaALt47D7Nz0vXR5T8=; b=efRup3eps2JNm5OD4dK//FwoU2f7YU96RKJX8wGYK8EuPNkzP3jiB9cn+gAtOjBKFQ WsVBdNtaPwcMw/PibxPF6xHE6+Y48eTUEpyfct0RTAbVZfzNSkNSxHjbFjwKTNEdFItH uBL4jIGOiRHF1pfjMGeZsGh1LnV76gr+hFOHnBTvQtK7lHBgg7aShn0LTXnG1MNkdCXC lo8JjSNAcT+xubwjqogkM22TcPQlXD/OLSjVMSmoXrYoRdkrLGH1XO7vGcCAqBEjLEh8 HT4Myat5avXNxrVSnQM4vhsT55LrclUvPMPJgxDDWuSIH5d1cp7ZPpaiTcDMaKQojlwa Cn+w== X-Gm-Message-State: AC+VfDxiTi7paK9XiqYzK0Uk8bP+Yltd14Hndx2Rs0nin9ufAdnPL2bc xSWSRDue/U73REhobxS3jYFZcayzBbM= X-Google-Smtp-Source: ACHHUZ6bwPjPCz0JPjXNSdAZN2teA7EjgGOEYHB7iMMTAPjLAsNAaCKWshrKyGLTTFgMYsKxLSaFOw== X-Received: by 2002:a05:6808:201f:b0:39e:f97a:6159 with SMTP id q31-20020a056808201f00b0039ef97a6159mr12881417oiw.50.1687482111976; Thu, 22 Jun 2023 18:01:51 -0700 (PDT) Received: from [192.168.0.12] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id k7-20020a544707000000b0039ee0bd8a11sm3659656oik.42.2023.06.22.18.01.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Jun 2023 18:01:51 -0700 (PDT) Message-ID: <0f571b61-00ab-0297-3883-c58f3edc5e17@gmail.com> Date: Thu, 22 Jun 2023 22:01:49 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20230622210451.16411-1-Reimar.Doeffinger@gmx.de> From: James Almer In-Reply-To: <20230622210451.16411-1-Reimar.Doeffinger@gmx.de> Subject: Re: [FFmpeg-devel] [PATCH] libaformat: fix incorrect handling of incomplete AVBPrint. 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 6/22/2023 6:04 PM, Reimar.Doeffinger@gmx.de wrote: > diff --git a/libavformat/realtextdec.c b/libavformat/realtextdec.c > index c281dec346..9f6aab789e 100644 > --- a/libavformat/realtextdec.c > +++ b/libavformat/realtextdec.c > @@ -80,6 +80,11 @@ static int realtext_read_header(AVFormatContext *s) > const int64_t pos = ff_text_pos(&tr) - (c != 0); > int n = ff_smil_extract_next_text_chunk(&tr, &buf, &c); > > + if (n < 0) > + { Put the opening bracket in the same line as the if(), please. > + res = n; > + goto end; > + } > if (n == 0) > break; > > @@ -103,7 +108,7 @@ static int realtext_read_header(AVFormatContext *s) > /* if we just read a