mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-29 04:14:23 -04:00
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: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
@@ -222,7 +222,8 @@ text_percent_internal (const char *text,
|
||||
|
||||
if (percentage == -1)
|
||||
{
|
||||
fwrite (text, 1, input_textlen, stdout);
|
||||
if (text != NULL)
|
||||
fwrite (text, 1, input_textlen, stdout);
|
||||
|
||||
/* Overwrite remaining space, if any */
|
||||
if (ncolumns > input_textlen)
|
||||
|
||||
Reference in New Issue
Block a user