Skip to content

Commit ff86da6

Browse files
author
Leonardo Alminana
committed
encoder: text: addressed previously missed uninitialized variable access
Signed-off-by: Leonardo Alminana <[email protected]>
1 parent d7c0105 commit ff86da6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cprof_encode_text.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,6 +2256,10 @@ int cprof_encode_text_create(cfl_sds_t *result_buffer,
22562256
return CPROF_ENCODE_TEXT_ALLOCATION_ERROR;
22572257
}
22582258

2259+
memset(context.indentation_buffer,
2260+
0,
2261+
cfl_sds_alloc(context.indentation_buffer));
2262+
22592263
context.indentation_level_size = 4;
22602264
context.indentation_character = ' ';
22612265

0 commit comments

Comments
 (0)