From patchwork Wed Aug 19 19:59:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Foucu X-Patchwork-Id: 21744 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 59B7F44AD09 for ; Thu, 20 Aug 2020 00:06:31 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 385B368AE82; Thu, 20 Aug 2020 00:06:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-il1-f195.google.com (mail-il1-f195.google.com [209.85.166.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 46B1B687F1D for ; Thu, 20 Aug 2020 00:06:25 +0300 (EEST) Received: by mail-il1-f195.google.com with SMTP id 77so21905544ilc.5 for ; Wed, 19 Aug 2020 14:06:25 -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=bSMp4BG4XZVWYzbXa9Z8jDcz3YmuGV2+/P/GlF8+EHM=; b=TLzN/qxrLSyi5NTq7dv3UVrBoXvJbIhDsdeMV8wBNeN8fbvAYwpro/Ys0ZtSt9oNt4 sFfRldM3rqhtymj35Ty+PAZk3ypwYZBEyWUmz2USK1yZKxFpqa8H03GhK99Meej4389l k/BM4zUgo17hrQEk7bWYhLMlluVM+2jH0PGaxG/G0SrwDcvgjl60MDOJPsFM5R5jh+M2 WSac4zR1qb4Om5eHcM+x/YF03Kv7IKjby99MGwBKeFcUheSeXMM6wxCNRWK4W7J1C0Zl 9pVMlbufDUet0Izn7GUx0vYPcFG1QMV8MEuQ8Nym+dHirwPw4AJnGY1BitiwfyQ3zDJT UmqA== 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=bSMp4BG4XZVWYzbXa9Z8jDcz3YmuGV2+/P/GlF8+EHM=; b=aDauu/VJ85W83uSGLkeqYmnLx3YbgvBWl+YS1VGkgWsGuod1Cz1KWcPpmnTQJKn3PX fpVUwYZNgrTJZ5PIOhBt0DUyItMvJ85feK65/b7c8L+R/uiAPnz9M9Bn8JzuRbdYyaOu SmRLE2VkJgXqTElFO5jlfpbQHHgm6Bmq6xlcr/9xdyFlCGrrs6g0CVAbcdPeSJvmHIll 0tMt7mIAB6H8Xh3arBrQy3+zcLDpjgf9dFjqMS2xw9cGg6wPooZTvV2W1zCjhSP2dTot bIP6G5ob1EpUsWjpIsuNXG6VcXiCHHuVgVWuMA/lKiipGjf0NRIIDyTUkiBgOk6C60C6 apYw== X-Gm-Message-State: AOAM530jbPZ7CgO83sbku1iJKzxkytAePhM88YAWQcM1Bg0EVuZTLW6r 9czYwA0p15oiNYAXM9MZ7BaoiddoTVQ= X-Google-Smtp-Source: ABdhPJyDAt1Mq4JwCG8aBJ+KfYN+7yjoAvKSLlhGWylxJXLrIFvqz2COm8XAKVFDS0Y14ux7WhYb/w== X-Received: by 2002:a63:30c:: with SMTP id 12mr21624pgd.155.1597867172061; Wed, 19 Aug 2020 12:59:32 -0700 (PDT) Received: from tfoucu.mtv.corp.google.com ([2620:0:1000:4001:a28c:fdff:feed:4b81]) by smtp.gmail.com with ESMTPSA id w16sm4464078pjd.50.2020.08.19.12.59.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 12:59:31 -0700 (PDT) From: Thierry Foucu To: ffmpeg-devel@ffmpeg.org Date: Wed, 19 Aug 2020 12:59:25 -0700 Message-Id: <20200819195925.130806-1-tfoucu@gmail.com> X-Mailer: git-send-email 2.28.0.220.ged08abb693-goog MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] libavformat/r3d.c: Fix Use-of-uninitialized-value in filename. 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" While reading the filename tag, it mays return a EOF and we are still copying the file with uninitialized value. --- libavformat/r3d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/r3d.c b/libavformat/r3d.c index 7aa0c5a2c3..7ba589530d 100644 --- a/libavformat/r3d.c +++ b/libavformat/r3d.c @@ -54,7 +54,7 @@ static int r3d_read_red1(AVFormatContext *s) { AVStream *st = avformat_new_stream(s, NULL); R3DContext *r3d = s->priv_data; - char filename[258]; + char filename[258] = {}; int tmp; int av_unused tmp2; AVRational framerate;