From ff86da6aa48b8cbf2ec41452c09e48dbb8f115dd Mon Sep 17 00:00:00 2001 From: Leonardo Alminana Date: Tue, 17 Dec 2024 17:20:26 +0100 Subject: [PATCH] encoder: text: addressed previously missed uninitialized variable access Signed-off-by: Leonardo Alminana --- src/cprof_encode_text.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cprof_encode_text.c b/src/cprof_encode_text.c index ba718a9..299af8a 100644 --- a/src/cprof_encode_text.c +++ b/src/cprof_encode_text.c @@ -2256,6 +2256,10 @@ int cprof_encode_text_create(cfl_sds_t *result_buffer, return CPROF_ENCODE_TEXT_ALLOCATION_ERROR; } + memset(context.indentation_buffer, + 0, + cfl_sds_alloc(context.indentation_buffer)); + context.indentation_level_size = 4; context.indentation_character = ' ';