diff mbox series

[FFmpeg-devel,01/12] avradio/sdrdemux: Fix use of uninitialized memory

Message ID 20230711211910.1257355-1-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,01/12] avradio/sdrdemux: Fix use of uninitialized memory | expand

Checks

Context Check Description
andriy/configure_x86 warning Failed to apply patch
yinshiyou/configure_loongarch64 warning Failed to apply patch

Commit Message

Michael Niedermayer July 11, 2023, 9:18 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavradio/sdrdemux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Niedermayer July 12, 2023, 11:26 p.m. UTC | #1
On Tue, Jul 11, 2023 at 11:18:59PM +0200, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavradio/sdrdemux.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Will apply patchset

[...]
diff mbox series

Patch

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);