Skip to content

Commit cb45068

Browse files
committed
check pointer before deref
1 parent 8c0a7c0 commit cb45068

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/argv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ argv_string_formatter(struct format_context *format, struct format_var *var)
386386
argv_string *value_ref = var->value_ref;
387387
const char *value = *value_ref;
388388

389-
if (!*value)
389+
if (!value || !*value)
390390
value = var->value_if_empty;
391391

392392
if (!*value)

0 commit comments

Comments
 (0)