From patchwork Fri Sep 13 16:36:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vectronic X-Patchwork-Id: 15061 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 B72FE447EFE for ; Fri, 13 Sep 2019 19:36:23 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 981BB6881E5; Fri, 13 Sep 2019 19:36:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B9FDD6881C0 for ; Fri, 13 Sep 2019 19:36:17 +0300 (EEST) Received: by mail-wr1-f67.google.com with SMTP id a11so22974426wrx.1 for ; Fri, 13 Sep 2019 09:36:17 -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=F/zR06gax4Sr7zu+G1hZhpuGach1yrempdZ14S6+oxY=; b=gJkdw6UTlCouRIjRw+02ilvMEG2n8mDqXIh49EE1FprYxaEPdz+3AmR28wOLVENYgS fZulARNO+UwKD/A7K1bLuTCbQvJNRSdPQn7AgisVnLtT9W1LnIpi0nbGLAAmSenDGx5m jr8ZWDrILN0C1hM/z4rBNWkALSzZVCp3pq9v2Nw/EwnMsRjzDxRRgkqepLLhpOotc5jb KwPhQzs6dyJ849/8Y54CddPvlQ5gZUdZC6/5aCvs12GzxSyKJZ7vjNUlkCW+h7aCnPME Bm6Bgg+DSvrmm4D2zGRXBLswR4H8Sv2zSKdUUQ5wr33i6dltZWGLEEb+9YI6dJEr2vSe gCUw== 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=F/zR06gax4Sr7zu+G1hZhpuGach1yrempdZ14S6+oxY=; b=DufZlBopOI6YYZC/IKOerX5nSo+zKTGc0QH9xkVVcN8QCQ/yjuyIsoVWSEZclbM6+w GU9rJQGuyz3hHv5KMI7Y0xmmornLHnFvisEjL4kUSD49mc2ZyOToupePCjyzda6942oy veKoehT71sYzLscS9qEzzX19a77MWTyyvSiXsBxm4qWuzjICH7UH86yVp4wY6hq620nA PgE55hQoSymkonRexbP9BhOMEmfVVvkKGwbATziX7AGw5016Mk+/b24ufQAave5fkcM4 IY23bkg//9ytPeyMFaXp8xTXb17+RRX4ti6j/Jg8giWZebOtqGYv7Z43eUcA+1G9FFcG 97fA== X-Gm-Message-State: APjAAAX8F5QPlDuRwqCRUUkBCasoBZLZ8AaaNEdo7fZsXVqe4sbu2BGu w+zkaQZHQB4noXTqfd4eM2uzgQnDwj4= X-Google-Smtp-Source: APXvYqyVz4de1DcpiThGeJZ9H5rVeUxC1fTh+CZ1vYBLpEZHUPagBSmDdTtHxhfuZekJrYDFSelbKw== X-Received: by 2002:adf:a382:: with SMTP id l2mr38590185wrb.194.1568392577162; Fri, 13 Sep 2019 09:36:17 -0700 (PDT) Received: from localhost.localdomain (78-32-249-178.static.enta.net. [78.32.249.178]) by smtp.gmail.com with ESMTPSA id l10sm30718909wrh.20.2019.09.13.09.36.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Sep 2019 09:36:16 -0700 (PDT) From: vectronic To: ffmpeg-devel@ffmpeg.org Date: Fri, 13 Sep 2019 17:36:07 +0100 Message-Id: <20190913163607.91841-1-hello.vectronic@gmail.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/dashdec: fix segfault when parsing segmentlist 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: vectronic Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" index into segmentlists_tab was specified as 4 instead of 3 causing invalid access further fix to: 7976 Signed-off-by: vectronic --- libavformat/dashdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 4f725ba09a..6a44912248 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -1017,7 +1017,7 @@ static int parse_manifest_representation(AVFormatContext *s, const char *url, duration_val = get_val_from_nodes_tab(segmentlists_tab, 3, "duration"); timescale_val = get_val_from_nodes_tab(segmentlists_tab, 3, "timescale"); - startnumber_val = get_val_from_nodes_tab(segmentlists_tab, 4, "startNumber"); + startnumber_val = get_val_from_nodes_tab(segmentlists_tab, 3, "startNumber"); if (duration_val) { rep->fragment_duration = (int64_t) strtoll(duration_val, NULL, 10); av_log(s, AV_LOG_TRACE, "rep->fragment_duration = [%"PRId64"]\n", rep->fragment_duration);