From patchwork Sun Feb 19 15:18:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 2604 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.22 with SMTP id n22csp484356vsb; Sun, 19 Feb 2017 07:18:31 -0800 (PST) X-Received: by 10.223.163.136 with SMTP id l8mr14078879wrb.42.1487517511725; Sun, 19 Feb 2017 07:18:31 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g68si9014712wme.131.2017.02.19.07.18.31; Sun, 19 Feb 2017 07:18:31 -0800 (PST) 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 0D408680A21; Sun, 19 Feb 2017 17:18:21 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe01-3.mx.upcmail.net (vie01a-dmta-pe01-3.mx.upcmail.net [62.179.121.156]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8C283680A21 for ; Sun, 19 Feb 2017 17:18:14 +0200 (EET) Received: from [172.31.216.44] (helo=vie01a-pemc-psmtp-pe02) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1cfTFl-0006wl-C0 for ffmpeg-devel@ffmpeg.org; Sun, 19 Feb 2017 16:18:21 +0100 Received: from [192.168.1.3] ([80.110.104.254]) by vie01a-pemc-psmtp-pe02 with SMTP @ mailcloud.upcmail.net id mfJG1u02y5VLSu801fJJTl; Sun, 19 Feb 2017 16:18:18 +0100 X-SourceIP: 80.110.104.254 From: Carl Eugen Hoyos To: FFmpeg development discussions and patches Date: Sun, 19 Feb 2017 16:18:16 +0100 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Message-Id: <201702191618.16885.cehoyos@ag.or.at> Subject: [FFmpeg-devel] [PATCH]lavf/mpeg: Initialize a stack variable 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! I cannot reproduce ticket #6160 and I wonder how memcmp() must be implemented to reproduce it but attached patch is supposed to fix it. Please comment, Carl Eugen From 0c3a72da0780682eb2899aee7ebe05a5e74a26eb Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sun, 19 Feb 2017 16:15:34 +0100 Subject: [PATCH] lavf/mpeg: Initialize a stack variable used by memcmp(). Fixes ticket #6160. --- libavformat/mpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index 423877e..a651cb3 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -138,7 +138,7 @@ typedef struct MpegDemuxContext { static int mpegps_read_header(AVFormatContext *s) { MpegDemuxContext *m = s->priv_data; - char buffer[7]; + char buffer[7] = { 0 }; int64_t last_pos = avio_tell(s->pb); m->header_state = 0xff;