From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 9153E46DB7 for ; Tue, 11 Jul 2023 21:19:22 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 319E468C5E0; Wed, 12 Jul 2023 00:19:19 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BFB4D68C329 for ; Wed, 12 Jul 2023 00:19:12 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1EC921BF206 for ; Tue, 11 Jul 2023 21:19:11 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 11 Jul 2023 23:18:59 +0200 Message-Id: <20230711211910.1257355-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 01/12] avradio/sdrdemux: Fix use of uninitialized memory X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Signed-off-by: Michael Niedermayer --- libavradio/sdrdemux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavradio/sdrdemux.c b/libavradio/sdrdemux.c index a34f784e63..a37018fd2f 100644 --- a/libavradio/sdrdemux.c +++ b/libavradio/sdrdemux.c @@ -1144,7 +1144,7 @@ static int setup_stream(SDRContext *sdr, int stream_index, Station *station) sst->rds_ring_size = ceil((2*105 / 1187.5 + 2.0*block_time) * sst->block_size_p2 / block_time); - sst->rds_ring = av_malloc(sizeof(*sst->rds_ring ) * sst->rds_ring_size); + sst->rds_ring = av_mallocz(sizeof(*sst->rds_ring ) * sst->rds_ring_size); sst->window_p2 = av_malloc(sizeof(*sst->window_p2)* 2 * sst->block_size_p2); sst->iside = av_malloc(sizeof(*sst->iside) * 2 * sst->block_size_p2); if (!sst->iside || !sst->window_p2 || !sst->rds_ring) @@ -1156,7 +1156,7 @@ static int setup_stream(SDRContext *sdr, int stream_index, Station *station) } } - sst->out_buf = av_malloc(sizeof(*sst->out_buf) * 2 * sst->block_size); + sst->out_buf = av_mallocz(sizeof(*sst->out_buf) * 2 * sst->block_size); sst->block = av_malloc(sizeof(*sst-> block) * 2 * sst->block_size); sst->iblock = av_malloc(sizeof(*sst->iblock) * 2 * sst->block_size); sst->icarrier = av_malloc(sizeof(*sst->icarrier) * 2 * sst->block_size); -- 2.31.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".