From patchwork Sat Sep 5 17:24:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 22114 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 29D4944B240 for ; Sat, 5 Sep 2020 20:52:44 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 046E968A0BE; Sat, 5 Sep 2020 20:52:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4AC666880A5 for ; Sat, 5 Sep 2020 20:52:37 +0300 (EEST) Received: by mail-pl1-f195.google.com with SMTP id k13so635384plk.3 for ; Sat, 05 Sep 2020 10:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=I5AaNS0FhZkXchNiS6Cu5iEbo4FEUL7Zd6y2utuMtUw=; b=qjwXkTQRMICSE9hRG9UC3AwFXHqviF/3bnhd+TlKPXx0X53GEOmlU4ajyCzPKSQaBw 48HWy0s2HVMd03vXdVCo2wqrcn1DHbxjIJZhh42qBxu3vq4jNvd+JPicXCk1dwb3aJWa oPwd8CVnmpnIyfHUN52xY2iEHPQ9pyT155fpTjm1iLMuOWIDmYs0WGQZuHxNZ1x1HN+e icgXsJtBlFQJt7CYhoF2LPjkjaME05J2nU2Tr7z1kh0156RvIsB5Oyb7IICJlO1pDssu OOkIpEw4+TnQPA6Hbbsk7xBXOFGXo136AiRba2ewRg/ezXX2pqXaWoM5aeUhyUXqlpAt ZAug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=I5AaNS0FhZkXchNiS6Cu5iEbo4FEUL7Zd6y2utuMtUw=; b=cpEdG0sqm5WbHU6n1BOiumogj3sCksWokoS3hNPPnAuncpj/jArok7gsY3w8Bp+n/l Pn41Sg6FQt6qQORHMZ43K38Bde5nqWArLuMwfyWv6YAPGVbUUWuuMuHhH5n/bDzer0EI h5v5rlvtMPhrUbOMUre+FblvEeTxbTkpf7UZjt5VrgeIVttD5isr4RQsQN6e4zCXUlg9 op+HzNX65IIlHpBmL1Gn22+LktIY75n9NksMQZXFS51OaEFTqYYNCF7TxEBJRAtC/aDT zs7GEVMdnEBmMdPqOQzCAoXgFr56TLU8bbYwQ9X6VRuAw4hY3ogQQgMTcbH7HbABsq0j Sc4w== X-Gm-Message-State: AOAM5331bdS0YIr+bP/+hHM+i3n2iONZjKP+byYfh0GMeQTB8HioOInJ ZIWRfLh8rx87sgQt9jjsA382leuLg8ZfOjjdj58BsWLXKx4= X-Google-Smtp-Source: ABdhPJxC+Cv2j4ljk6G6VufIuokwJCbo6gju5zUEad0BnFkcZRkqZhkJjR3PG08sjUGgmbwKgQGh3r53q9LCGA01seE= X-Received: by 2002:a17:902:8a82:: with SMTP id p2mr13425719plo.184.1599326681254; Sat, 05 Sep 2020 10:24:41 -0700 (PDT) MIME-Version: 1.0 From: Carl Eugen Hoyos Date: Sat, 5 Sep 2020 19:24:30 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavc/tiff: Do not fail for an ICC profile with invalid type X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! Attached patch fixes ticket 8884. Please comment, Carl Eugen Subject: [PATCH] lavc/tiff: Do not fail for an ICC profile with invalid type. Fixes ticket #8884. --- libavcodec/tiff.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 8a42e677ce..81e9a60bdf 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1682,8 +1682,10 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) } break; case TIFF_ICC_PROFILE: - if (type != TIFF_UNDEFINED) - return AVERROR_INVALIDDATA; + if (type != TIFF_UNDEFINED) { + av_log(s->avctx, AV_LOG_WARNING, "Invalid ICC profile type %d\n", type); + break; + } gb_temp = s->gb; bytestream2_seek(&gb_temp, SEEK_SET, off);