Skip to content
Snippets Groups Projects
Commit 1893c1ff authored by Philip Withnall's avatar Philip Withnall
Browse files

glnx-console: Add missing NULL check before writing out text


It’s possible that text is NULL on this path.

Coverity CID: 1376570

Signed-off-by: default avatarPhilip Withnall <withnall@endlessm.com>
parent d18f026e
No related branches found
No related tags found
No related merge requests found
...@@ -222,7 +222,8 @@ text_percent_internal (const char *text, ...@@ -222,7 +222,8 @@ text_percent_internal (const char *text,
if (percentage == -1) if (percentage == -1)
{ {
fwrite (text, 1, input_textlen, stdout); if (text != NULL)
fwrite (text, 1, input_textlen, stdout);
/* Overwrite remaining space, if any */ /* Overwrite remaining space, if any */
if (ncolumns > input_textlen) if (ncolumns > input_textlen)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment