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 B20594255D for ; Wed, 5 Jan 2022 02:44:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1BE3368A920; Wed, 5 Jan 2022 04:44:56 +0200 (EET) Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 31A03680BA5 for ; Wed, 5 Jan 2022 04:44:50 +0200 (EET) Received: by mail-io1-f42.google.com with SMTP id s6so37687652ioj.0 for ; Tue, 04 Jan 2022 18:44:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandflow-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZPzMdngCm8qGmninJbU1BRLzZlL+bpYdcJZD24Hnpxk=; b=8GWVUHQtZxRa/MzmQAHJZnbPmCckNG+ETfA3eNIVDWl6Emu/YOaQB/qHAHoAWsbh72 iGp84OgdKXSUUCuEW8VU7ni9bicgFVgkqb0CDi0KqfQiuVykETtO8wyod04zVSES5rfA qTZwBRFBkaPkeWCV9yOqWt3m5Q2noDw4H1XT9zCNnD/uq0wkvupoAETeFwyGeG5clA2w 0Mwcc18Ymu7P+ajTDYOU+sUpjj3gF5G/44L+wXD7LAs+4BzW0h33BSSpLyqGC9j+wAfS EPsT2drhS/06WcqhGhEQxA+KNihVlYDp38BmuBn4VzAllv3Cg8ZPU1qi9B+8fLVbvbGn zYYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZPzMdngCm8qGmninJbU1BRLzZlL+bpYdcJZD24Hnpxk=; b=gMia16YMDc0W4qpqB9GpiF41KieescUgPuiH7qg5Fmz6NgcY0aaKsn09cDiccynZUr v80sWoJuxI1dPgck8JY+o/E2ph008ha0PXRz4CStqmZ/LfNgEcqe7CyZ6Z6PY7Ffuq3Q aAICXah0am3aD2IyqMjkeJo04GptkC4S7+AIamD5ZX+xFyRnHm6aRidIUJi3F9ABKJOS diPKttzPDo1E9Ks2La7UyVXFP62F1Z/TiEpYVblMbqFZG8zWLmtKovzChU4YfQUvBMUu 0Up7cyA+S1oJ5+NcFNQjSXXzFu43vqiqODXa+GFp5Id932Nzx978XeIPZBtzwbDyLWu6 mwuQ== X-Gm-Message-State: AOAM533X35sEFG89CU5RzEyAEfkjxOfvOpL8Qgvur24T3KTQHSldmZm9 5J7ZT4O8U4Ne46ddIWm4Dula3D3QWgmVKg== X-Google-Smtp-Source: ABdhPJya+4lUUsQS1N3qTRofvkmXF5X7WLHqPSperT48wiyw19YTfCOb47uk1ZlVXDWeqpNHpf1QHw== X-Received: by 2002:a05:6602:2d51:: with SMTP id d17mr24810013iow.47.1641350688625; Tue, 04 Jan 2022 18:44:48 -0800 (PST) Received: from mail-il1-f176.google.com (mail-il1-f176.google.com. [209.85.166.176]) by smtp.gmail.com with ESMTPSA id q8sm26222270iow.47.2022.01.04.18.44.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jan 2022 18:44:48 -0800 (PST) Received: by mail-il1-f176.google.com with SMTP id m4so298683ilf.0 for ; Tue, 04 Jan 2022 18:44:48 -0800 (PST) X-Received: by 2002:a92:c565:: with SMTP id b5mr26597710ilj.87.1641350687942; Tue, 04 Jan 2022 18:44:47 -0800 (PST) MIME-Version: 1.0 References: <20220104061056.32737-1-pal@sandflow.com> <06b93b03-022b-4685-690d-5cda0dba9544@zanevaniperen.com> In-Reply-To: <06b93b03-022b-4685-690d-5cda0dba9544@zanevaniperen.com> From: Pierre-Anthony Lemieux Date: Tue, 4 Jan 2022 18:44:36 -0800 X-Gmail-Original-Message-ID: Message-ID: To: Zane van Iperen Subject: Re: [FFmpeg-devel] [PATCH v1] avformat/imf: fix CPL parsing error handling 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: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Tue, Jan 4, 2022 at 4:58 PM Zane van Iperen wrote: > > > > On 4/1/22 16:10, pal@sandflow.com wrote: > > From: Pierre-Anthony Lemieux > > > > Signed-off-by: Pierre-Anthony Lemieux > > --- > > libavformat/imf_cpl.c | 51 +++++++++++++++++++++++-------------------- > > 1 file changed, 27 insertions(+), 24 deletions(-) > > Could you please resend this as two separate commits? One with the change, one > with the re-indenting? It makes it easier to review (and bisect) in the future. Ok. Got it. See v2 at: http://ffmpeg.org/pipermail/ffmpeg-devel/2022-January/290840.html > > For reference, the effective change is: > > diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c > index 28798d3e36..366a1be9e2 100644 > --- a/libavformat/imf_cpl.c > +++ b/libavformat/imf_cpl.c > @@ -807,7 +807,9 @@ int ff_imf_parse_cpl(AVIOContext *in, FFIMFCPL **cpl) > av_log(NULL, AV_LOG_ERROR, "Cannot read IMF CPL\n"); > if (ret == 0) > ret = AVERROR_INVALIDDATA; > - } else { > + goto clean_up; > + } > + > LIBXML_TEST_VERSION > > filesize = buf.len; > @@ -817,6 +819,7 @@ int ff_imf_parse_cpl(AVIOContext *in, FFIMFCPL **cpl) > AV_LOG_ERROR, > "XML parsing failed when reading the IMF CPL\n"); > ret = AVERROR_INVALIDDATA; > + goto clean_up; > } > > if ((ret = ff_imf_parse_cpl_from_xml_dom(doc, cpl))) { > @@ -833,8 +836,8 @@ int ff_imf_parse_cpl(AVIOContext *in, FFIMFCPL **cpl) > } > > xmlFreeDoc(doc); > - } > > +clean_up: > av_bprint_finalize(&buf, NULL); > > return ret; > > > > + av_log(NULL, > > + AV_LOG_INFO, > > + "IMF CPL Id: " FF_IMF_UUID_FORMAT "\n", > > + UID_ARG((*cpl)->id_uuid)); > > + } > > + > > + xmlFreeDoc(doc); > > + > > Trailing whitespace here. > > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".