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 CDDF9446B2 for ; Tue, 20 Sep 2022 22:02:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 063A268BA7A; Wed, 21 Sep 2022 01:01:59 +0300 (EEST) Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9FE0B68B357 for ; Wed, 21 Sep 2022 01:01:52 +0300 (EEST) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-3487d84e477so43443297b3.6 for ; Tue, 20 Sep 2022 15:01:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date; bh=PV+zFaa0SgZRQaWsaFZKVe8Tq+RhDlz19ufYcHd0ua8=; b=iKErmubnUdQbUPZvJEo4WQlSElgchksMye6CdlYxLHH3NM2+6+/j10QXphNjMKG/if FTZibUkabNkawNoMZl0Xr9Q2G1IIBHlhhQywf3BfMEBsULgMEf/RptoOK2XobtZ5f/G2 MaOtmD/ZKFe/wCQx+XRCu8q+ogJeWdStl7Aq0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date; bh=PV+zFaa0SgZRQaWsaFZKVe8Tq+RhDlz19ufYcHd0ua8=; b=TB9KLLO2EzbiV/RjK8Dkfj84FXjTod+oh9CEvfh+mVmk+D8s+/2u1b41wbAHuOUD0m ckRjWCestbs4If3nPhgFCpWKPr9dpYXz7f5oNPfwc5eNCje6J+ByLG+B283sUA8T6fKz XA/MsTOb5ASUUGOh4uwIa/rGK4QSbO3LnOLXxxh6f1S6cQgPYKvdDie7TeLM+lvoMAK7 Ix1XKVjJyXUg5vYzexLJ052wONkYvrP+DxwxsDAheSsHlftcM6ZGAO/sb9QwuFfrMumM 6Icv881xa0DaRWAVknIMGk0kat4QKnB4LrgWsYSYOS30vIBHXkCQZPUp2zIKJLQ+adgA CdJQ== X-Gm-Message-State: ACrzQf00x3Ig/pCWM2/HmB6mTrls22EGAcRtlj4sZ8Y13m+SFWHoAbTQ kB2AOYz5sFMT6UiBay4KutGmktaeD+HkF0jVoqJXfSq3994= X-Google-Smtp-Source: AMsMyM6nZMZLtOnQNcoP1X7pdgeBF0bSHcN01+pC33wSQBgiYOyD8eTn/BCZr58jzoOPR1oEq5l10jG8qWfU8tuBGek= X-Received: by 2002:a0d:de43:0:b0:349:31bd:e8d5 with SMTP id h64-20020a0dde43000000b0034931bde8d5mr21025279ywe.283.1663711310867; Tue, 20 Sep 2022 15:01:50 -0700 (PDT) MIME-Version: 1.0 References: <2fbbb930-fafa-8fea-b7c4-fd2a15289958@gmail.com> In-Reply-To: <2fbbb930-fafa-8fea-b7c4-fd2a15289958@gmail.com> From: Will Cassella Date: Tue, 20 Sep 2022 15:01:40 -0700 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] libavformat/flac_picture: Don't return AVERROR_INVALIDDATA for errors with flac picture mimetype 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-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: Sorry for the delay, didn't see your reply! The issue is that we do want to error out most of the time on invalid input, but for our needs the mime-type of the attached picture being empty or unknown isn't really relevant. Could there be a way to classify this error differently so that it could be ignored, while keeping AV_EF_EXPLODE enabled for everything else? Thanks, Will On Fri, Sep 9, 2022 at 6:16 PM James Almer wrote: > > On 9/9/2022 7:44 PM, Will Cassella wrote: > > In the case where the FLAC picture MIME type is not understood, fail to > > parse the picture silently rather than return AVERROR_INVALIDDATA. > > > > This originated from a bug reported in Chromium: https://crbug.com/1052821 > > > > Signed-off-by: Will Cassella > > --- > > libavformat/flac_picture.c | 4 ---- > > 1 file changed, 4 deletions(-) > > > > diff --git a/libavformat/flac_picture.c b/libavformat/flac_picture.c > > index b33fee75b4..1acad9b251 100644 > > --- a/libavformat/flac_picture.c > > +++ b/libavformat/flac_picture.c > > @@ -68,8 +68,6 @@ int ff_flac_parse_picture(AVFormatContext *s, > > uint8_t **bufp, int buf_size, > > if (len <= 0 || len >= sizeof(mimetype)) { > > av_log(s, AV_LOG_ERROR, "Could not read mimetype from an attached " > > "picture.\n"); > > - if (s->error_recognition & AV_EF_EXPLODE) > > - return AVERROR_INVALIDDATA; > > If you don't want to error out, then don't enable explode mode, which is > meant to abort on the slightest issue? > > > return 0; > > } > > if (len + 24 > bytestream2_get_bytes_left(&g)) { > > @@ -91,8 +89,6 @@ int ff_flac_parse_picture(AVFormatContext *s, > > uint8_t **bufp, int buf_size, > > if (id == AV_CODEC_ID_NONE) { > > av_log(s, AV_LOG_ERROR, "Unknown attached picture mimetype: %s.\n", > > mimetype); > > - if (s->error_recognition & AV_EF_EXPLODE) > > - return AVERROR_INVALIDDATA; > > return 0; > > } > > > _______________________________________________ > 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". _______________________________________________ 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".