From patchwork Sat Aug 4 00:58:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 9886 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:104:0:0:0:0:0 with SMTP id c4-v6csp737465jad; Fri, 3 Aug 2018 17:59:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcKCMj4xxjzbgDGhsjxCfkOkiYJcemzT81EFc6eRTt63p3DtQCxq+nSU0SzIZXi9GeJ8lgy X-Received: by 2002:a5d:6841:: with SMTP id o1-v6mr3891237wrw.159.1533344355312; Fri, 03 Aug 2018 17:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533344355; cv=none; d=google.com; s=arc-20160816; b=jb7L5ycVYEW/NltMYtXt3UmGI0T6nUBusYLM5896jNL9Ceb0mB9mnX/LSXdNDLPKd1 70JTn3nFFHyvKZvkO3C0EnDNMfr75ss4u+5pdO0U3jc8xR9Pnkhl80tqrB+O72ADpIaz RkI9egpblHEP/8bdcpfv9E0RZpskWRiea9gWnXrG1XeFVodDStlRLHL5g7cqnO3k9zB3 wkgfqdqtmUY9CJNj+rMHT5nrKkr/DE6oC/wAm6cS796FkP8QDGsjt/CR+hQj+SJafiy+ /f2Qno+pcsxbaHTDQvqPGVsYEsOYVjOsMyT18av4Fy3SMRBDwrPDWuFnydxDw+P02Qnu 0Iig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=MeOAUxjWyjiMSDT0h9NUT/DE/ikDZJS5R4JUmHq9b4I=; b=P8BxOmnz9g7e7rqA61YrplcUC8cwmlklhGPGwv/tdAscBpfRQ0PbG2We0y2+4KwYtE m6ZOaqx4Qzb7LH2Tqru0ucpBaTMY0u5AGtjMnHi4wYFSq2Zphzhw5w5Eaan+ZoGiyFck f2OPMBcZ4G4d2wSYyFAmTx3+1b355Ahlq0lRgVQrbXmdVGSioCNXGYggQkocXXpi4gcv GQXU3hFT3OCXa8vUtnRJ1fioIrFEOyfrolontYptkUG1P+MF1GX3nhnt9i/h+6fArZsW EfC3FGVcoNChg67mKU9gWFzxZcadVZ4lI8G+oqPah5WFLMnFoRd/6QwSmEEhvCg0qMrE 3H4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id s18-v6si4038193wrr.430.2018.08.03.17.59.14; Fri, 03 Aug 2018 17:59:15 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0BA1C689C5E; Sat, 4 Aug 2018 03:58:54 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe05-3.mx.upcmail.net (vie01a-dmta-pe05-3.mx.upcmail.net [84.116.36.13]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D336A689C14 for ; Sat, 4 Aug 2018 03:58:46 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe05.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1flkuP-0004Tj-GO for ffmpeg-devel@ffmpeg.org; Sat, 04 Aug 2018 02:59:05 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id Joz41y00J0S5wYM01oz53S; Sat, 04 Aug 2018 02:59:05 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 4 Aug 2018 02:58:30 +0200 Message-Id: <20180804005833.16836-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.18.0 Subject: [FFmpeg-devel] [PATCH 1/4] avcodec/microdvddec: limit style characters in parsing 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Fixes: Timeout Fixes: 9293/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MICRODVD_fuzzer-5643972541153280 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/microdvddec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/microdvddec.c b/libavcodec/microdvddec.c index 4a34267793..dad0ec8a22 100644 --- a/libavcodec/microdvddec.c +++ b/libavcodec/microdvddec.c @@ -99,7 +99,7 @@ static char *microdvd_load_tags(struct microdvd_tag *tags, char *s) case 'Y': tag.persistent = MICRODVD_PERSISTENT_ON; case 'y': - while (*s && *s != '}') { + while (*s && *s != '}' && s - start < 256) { int style_index = indexof(MICRODVD_STYLES, *s); if (style_index >= 0)