Skip to content

Commit

Permalink
encoder: text: addressed previously missed uninitialized variable access
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Alminana <[email protected]>
  • Loading branch information
leonardo-albertovich authored and edsiper committed Dec 17, 2024
1 parent a4d13e8 commit 60b50df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cprof_encode_text.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ' ';

Expand Down

0 comments on commit 60b50df

Please sign in to comment.