Skip to content

Initialize the first element of a character array for safety

Arаm Sаrgsyаn requested to merge 3153-cid-348325-using-uninitialized-value into main

There is a possibility of passing an uninitialized character array as a string type parameter for printf(). This is an error, but since the format string includes a precision value which would have been initialized to zero in the case when the buffer is not initialized, this should be safe.

Initialize the first element of the character array with '\0' for safety.

Closes #3153 (closed)

Merge request reports