From 3a11945fec9ddc32f73c0f54b8fb52081ba3f217 Mon Sep 17 00:00:00 2001 From: Andrew Alderwick Date: Fri, 5 Nov 2021 23:26:45 +0000 Subject: [PATCH] Fix null pointer dereference if File/name not set --- src/devices/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/file.c b/src/devices/file.c index 1f8a4d4..8eab577 100644 --- a/src/devices/file.c +++ b/src/devices/file.c @@ -24,7 +24,7 @@ WITH REGARD TO THIS SOFTWARE. static FILE *f; static DIR *d; static int dir_fd; -static char *current_filename; +static char *current_filename = ""; static enum { IDLE, FILE_READ, FILE_WRITE,