From patchwork Thu Oct 29 14:58:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23275 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 12B2044975B for ; Thu, 29 Oct 2020 16:58:45 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CBDF768AF73; Thu, 29 Oct 2020 16:58:44 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 39A4068086B for ; Thu, 29 Oct 2020 16:58:38 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id m13so3112847wrj.7 for ; Thu, 29 Oct 2020 07:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ayUGbtbsp8YHbVuxnXDgjRIBClwISs+rxSU3C1Unzy4=; b=tFgv73vUTpRdPnFIJ9BS0bOuJ/RnQnTJmRnNwXf0kUzMbzvOEX6+YKGLvrW6rVpXFP oWKOEOIBb8VKG7GKcfHebnShYF4/CU1BbR3VRu3MhyOmxVnbdMI3KdB/WQOMmZ50AKy3 Et954K+4MKm0iksvltgOPhvJSNXcFc+xWIDMWLcBH3ahxzNgpx4YgNv2PKMZYv/hzHBn sNA5tA2dw9QYgpOVp1WgnIw8PlJgUR5m/ocdHPC+Hz1HYPZu/5jhti55zXQSlPo0XztF JHIRSMzIyig0Sw5HULAA0k6mY9Dwc6a2sKMWMCukablxxjr1GkhvT1Ye8Xz8F12xlUzf sBIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ayUGbtbsp8YHbVuxnXDgjRIBClwISs+rxSU3C1Unzy4=; b=jOnZIcgCYRCeX4lMC58rRk5jUl6iR4F8nIp68wtqmovDmAskHUDMYZFumVFqVdgC2r OdqofKnQueishV5GpJMr0yXdeU0oR0mI0NrMVJKf1UbUXzsrn9+g6c6f07sYdPIF5NGS rwBIRfyMfkpRr/VqOPYW301sUqy4M9FeRWTheykZYd6RutmuFwQXg+UwIc1laXMg/2bG rGHtuIqk2fZTp2+BA/rnszB4Fg5KsRJ2p3HKxmfr0fudPKnsiaiy3tcWhzqYpKWEa6Pc zyHIKJnnAPwPl8pf0SjHKq6snUiDorceazZQfmb7pMXE6NJCz+VnyJJsGvryPMsBZgIs g/Dg== X-Gm-Message-State: AOAM533IkWfKpae1i8yI1MrKGYbmalmp7j1FtJIX+lO/TZ6C3ouoFUI4 ekoSn92DZci6YqIEWOzP0JC1+7MymAs= X-Google-Smtp-Source: ABdhPJyXQgrSdGkOlSfJrHkkEWTxJWV1GQ5ZtgYfoZ194m3nxCMt7uQ9IsUitAn6iVDLCRsXstla5Q== X-Received: by 2002:a5d:698e:: with SMTP id g14mr5935203wru.232.1603983517485; Thu, 29 Oct 2020 07:58:37 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id o129sm181202wmb.25.2020.10.29.07.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 07:58:36 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 29 Oct 2020 15:58:29 +0100 Message-Id: <20201029145830.444147-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/tscc2: Don't check for errors for complete VLCs 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavcodec/tscc2.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libavcodec/tscc2.c b/libavcodec/tscc2.c index 6aadb51ad4..9fa28fe9fc 100644 --- a/libavcodec/tscc2.c +++ b/libavcodec/tscc2.c @@ -151,8 +151,6 @@ static int tscc2_decode_mb(TSCC2Context *c, int *q, int vlc_set, dc = get_bits(gb, 8); } else { dc = get_vlc2(gb, c->dc_vlc.table, 9, 2); - if (dc == -1) - return AVERROR_INVALIDDATA; if (dc == 0x100) dc = get_bits(gb, 8); } @@ -161,15 +159,11 @@ static int tscc2_decode_mb(TSCC2Context *c, int *q, int vlc_set, c->block[0] = dc; nc = get_vlc2(gb, c->nc_vlc[vlc_set].table, 9, 1); - if (nc == -1) - return AVERROR_INVALIDDATA; bpos = 1; memset(c->block + 1, 0, 15 * sizeof(*c->block)); for (l = 0; l < nc; l++) { ac = get_vlc2(gb, c->ac_vlc[vlc_set].table, 9, 2); - if (ac == -1) - return AVERROR_INVALIDDATA; if (ac == 0x1000) ac = get_bits(gb, 12); bpos += ac & 0xF;