From patchwork Mon Sep 16 10:44:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vectronic X-Patchwork-Id: 15095 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 D7CEF443E21 for ; Mon, 16 Sep 2019 13:52:57 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B0EB3688048; Mon, 16 Sep 2019 13:52:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5FAA3680987 for ; Mon, 16 Sep 2019 13:52:51 +0300 (EEST) Received: by mail-wr1-f68.google.com with SMTP id l11so38310249wrx.5 for ; Mon, 16 Sep 2019 03:52:51 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=arDE4E5rX9H7z/lUziZzzs+/QrEFnmjnsmc/0PfCKeg=; b=e2uCN/+zRGslPaL39iWkSRhhzUSDsqdz3dnKIOAa3hWgS0sD0VL6UubK6DOQvt4apd SZkY+BeE9bTy1kTWgEC+r3+2SqMEEEGYbQZ6k1+pagJNYS/iR+0uVSCxh4TZlmXI7jxq ed6CvkrgZgytS860P1gRnHac6EjQuePrDvSuQUwam85yWjuszWM//s/f0023IzUV1A7m avx7OSDznK4J6tDtwXqMKW9eiT5ONo7PifbxVfdFlnLn5EvRGc4OT8rp/Z9lq+FuZNvM tWmbRBxu/P3LxzUFee2KqCsGyMRuT9Ro+ZN1HUM8TP2w1h1vzx3kisQB7hsr0MgdR6v6 8VQw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=arDE4E5rX9H7z/lUziZzzs+/QrEFnmjnsmc/0PfCKeg=; b=r/FtuTfaYYEpf3sPRawUvwd8heKjgTkC0m8WAnBWzB7iTIaKR43KfZIoiuDpbxMZjO z2cG8nE67fXCCXW1TbBSTNanbigoTIu5ILqH5a7tNOTkEy5dhzBtYu48HGPKvkipMC6W 8HDMutXxnr8QshbqfIhgYxq3cabQXCFbgHHdBZrE42288Lxbu/hgiQyxBsL0TFGC6xCv D5fDSvB8rYnNOliz+U9liaN4fcO10FvNcaROqhm3Xm1nuoBm6l9ZlSLVUv/B4B7Ur/d6 zXK0zOLVYKQksTIIOCfg+I5Ju/QTdGcmFkjA8iMOTCM3FfqADlfvp9nhQFggq0cIruZc c2NA== X-Gm-Message-State: APjAAAWUWRYEKlaDEnOTDBbp+8h4OCSVHtCi+66pi9y6KqcfXbN9EmXf hltQ+pNMdzGNETOPWdlm+pBip2JCLxI= X-Google-Smtp-Source: APXvYqxN9Yjpb9diJbqrfjVL7rSntrRxu/I2fnIYRY7Ep2QY3mHqA9Vvgc/vi5AP2DPcob3+cz9WqQ== X-Received: by 2002:adf:f4cd:: with SMTP id h13mr4475986wrp.42.1568630676914; Mon, 16 Sep 2019 03:44:36 -0700 (PDT) Received: from mechagodzilla.chapatronic.net (cpc76904-dals22-2-0-cust471.20-2.cable.virginm.net. [81.106.45.216]) by smtp.gmail.com with ESMTPSA id v8sm57624512wra.79.2019.09.16.03.44.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Sep 2019 03:44:36 -0700 (PDT) From: vectronic To: ffmpeg-devel@ffmpeg.org Date: Mon, 16 Sep 2019 11:44:28 +0100 Message-Id: <20190916104428.23631-2-hello.vectronic@gmail.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190916104428.23631-1-hello.vectronic@gmail.com> References: <20190916104428.23631-1-hello.vectronic@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH V3 2/2] 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: 8135 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 738bfeaefb..7713ee8907 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);