diff options
Diffstat (limited to 'printf.c')
-rw-r--r-- | printf.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -145,6 +145,10 @@ static int bfs_printf_h(FILE *file, const struct bfs_printf_directive *directive buf = "."; } + if (!buf) { + return -1; + } + int ret = fprintf(file, directive->str, buf); free(copy); return ret; |