From patchwork Thu Aug 13 21:21:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Foucu X-Patchwork-Id: 21637 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 C65A044AFE1 for ; Fri, 14 Aug 2020 00:22:08 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A83DA688084; Fri, 14 Aug 2020 00:22:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D92D4688084 for ; Fri, 14 Aug 2020 00:22:01 +0300 (EEST) Received: by mail-pf1-f170.google.com with SMTP id d22so3469599pfn.5 for ; Thu, 13 Aug 2020 14:22:01 -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=HcCF+N6y0sqrF5jLMYgwKq4HEGleV85ttH2t+zaiOsk=; b=kGh8yt4yZPPAGVTUx1VFmko5kvVlyEx+lW7ZN2tpx867xXlCUcoeuXHQh91B/zBvsz LQDCSAjwHxTkrZV6WV31cblEWv4HiHBIrHJtPC7NlBQzPOorzmA99/hqV8H4/dBDpSdh Po5U+nkGi3+uRUQVkwJFOB2kbRxCk+eioOVWK5YBqovBMO5rAHuliTYROjdp+0unrOdQ E8S7O08vbXjZOTs/qyjDNc0qKCoMhaMPyUGf8MT/JtRFrBYkAHbs/aDegz57Pygr8V2a euss2CAW5DgRw1sjgh0zZskg3WEYlzGwKOrH33ykIZ07DaiaX1gFVASQ2C0qsCVE0QFC L/hg== 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=HcCF+N6y0sqrF5jLMYgwKq4HEGleV85ttH2t+zaiOsk=; b=naFXGp0ICkG7WXzA5sm5EUdT/VAF7VX17zc34uPEipx7UDr3hm9AtPkz7dKxe/0wYs ymZW3/aCGYrI7d937OgNJ8QpTiw4M3CNio/mvt5+JidsfO99YjjPNGHGD2wxUOwtoVU7 POFdYfruzUteNSV4MGVlDOYTINSi4p5SlRIZ6juPnNQwzcEIQEe+/Vp0uBxd5w/fr0rg H5PNxxZxZp2Akjqly/oeVuJv9L4LfUq+/lW1BDRUcXaGcrO2UtVIP+ytpjBG3+9bRXeI k6EOx0UA+P91uMOSrLegd4WGfcuoJtqFuDtcDxl4DlnhS0fVsa+7H6VqVzVr4Gf0K8Ep NzJw== X-Gm-Message-State: AOAM5301f+ltJDc+kRgbOboqcBvZlzGDk4Gjcz/GZwSpn4ZG8aJtUXMB /aAu62I0IOg6sZVZYkxQJgqSb/ZE X-Google-Smtp-Source: ABdhPJxlwoEQG63oApqFQS3A5HSsRqXUIgvrr5AAaaRI9T2VGk9yX0VqqsjTc4aqpIQGSxNIYEcE9Q== X-Received: by 2002:a63:4381:: with SMTP id q123mr5141603pga.6.1597353719617; Thu, 13 Aug 2020 14:21:59 -0700 (PDT) Received: from tfoucu.mtv.corp.google.com ([2620:0:1000:4001:a28c:fdff:feed:4b81]) by smtp.gmail.com with ESMTPSA id s22sm6841262pfh.16.2020.08.13.14.21.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Aug 2020 14:21:59 -0700 (PDT) From: Thierry Foucu To: ffmpeg-devel@ffmpeg.org Date: Thu, 13 Aug 2020 14:21:55 -0700 Message-Id: <20200813212155.2905704-1-tfoucu@gmail.com> X-Mailer: git-send-email 2.28.0.220.ged08abb693-goog MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] libavformat/mpeg.c: Initialize the buffer uses to read the PTS. 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: Thierry Foucu Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Fixed an Use-of-uninitialized-value --- libavformat/mpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index 265b2bd1ad..15a768e6e8 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -146,7 +146,7 @@ static int mpegps_read_header(AVFormatContext *s) static int64_t get_pts(AVIOContext *pb, int c) { - uint8_t buf[5]; + uint8_t buf[5] = {}; buf[0] = c < 0 ? avio_r8(pb) : c; avio_read(pb, buf + 1, 4);