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 56E7B42A3C for ; Fri, 9 Sep 2022 22:44:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DB09068BAC7; Sat, 10 Sep 2022 01:44:31 +0300 (EEST) Received: from mail-yb1-f194.google.com (mail-yb1-f194.google.com [209.85.219.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D6EB168B6F7 for ; Sat, 10 Sep 2022 01:44:25 +0300 (EEST) Received: by mail-yb1-f194.google.com with SMTP id 202so4681216ybe.13 for ; Fri, 09 Sep 2022 15:44:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=yxYCt37isdgOBMZV48ZmKUme9zLOTyd7DqsQAP8gsgY=; b=dAe5eoWyR6LCQc45FQn0JWvAqMVWt2xNNR+7ViNNVa/b0B5DleSC7hmZWMP9mB6xgg /NddEw4mzgsh32uc8kNnVaiQZAXBGC7mX/LWgVfpWzMJtLa5eMKKagK5pp7QLRgFoxSN d0x5G4pymF6ng8LgCziSmqQZ9SuoRn2kYxR+U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=yxYCt37isdgOBMZV48ZmKUme9zLOTyd7DqsQAP8gsgY=; b=mHBXkd/YLa4d20raDcUtJVt4clokNaqAZ31IfzP4L44IbIyaWOP7Lp1VnGPge0lsXQ 3bYonqw9tuceOXiAANpPDnthGF6I5p1B+FCJT17aNFfhonnyQIVnwWZ+A4rJaMuuIhpc hAPXWxrbs8BKSENkE3kqsgydTHPanpdkzO54K+/OGlqhA6s5W805+EQ0qsGrslH9UWkz dD1Z+feRcKJkS8gbXNHRVUB5QswJ2uiheQ28o4kxkCFo05qlzb6JDHqbUZvOHZz+f1ZC Od7QCntIDBjGyhKkW9GhSrJ88gd+IOHyR/3U+v8PwnkVTUGch5g+mY9h1xNkCiVKLDSk BQ3A== X-Gm-Message-State: ACgBeo2niHUsVz4yZeAZrcqL+tyK8jKDNkWmCrb+mupdCtmCKte+Pi/a OzzBCrOQ2nME/7Cch9wh7NmWP8tCobmmC/bIvCg1yVByimVe9JqrN1aFIWRH X-Google-Smtp-Source: AA6agR7pjaKTf2rZbum/UU4Q6u+MkQ/TQmDClwSJQ9Y6N9x6o9vfzSdkApELkl6YtfE+VtvezEHro8fEI9duFWO6miw= X-Received: by 2002:a25:7356:0:b0:6a9:571f:7ab3 with SMTP id o83-20020a257356000000b006a9571f7ab3mr13428719ybc.100.1662763463180; Fri, 09 Sep 2022 15:44:23 -0700 (PDT) MIME-Version: 1.0 From: Will Cassella Date: Fri, 9 Sep 2022 22:44:12 +0000 Message-ID: To: ffmpeg-devel@ffmpeg.org Subject: [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: 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; 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; } -- 2.37.2.789.g6183377224-goog _______________________________________________ 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".