From 2d3856d3addc0fb1e3d1e214fb24c701d641c296 Mon Sep 17 00:00:00 2001 From: "Stephen M. Cameron" Date: Fri, 1 Oct 2021 02:23:00 -0400 Subject: [PATCH] Prevent readFile from returning uninitialized pointer on fopen() failure. Signed-off-by: Stephen M. Cameron --- src/system/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/io.c b/src/system/io.c index ed59acf..dfd6ab4 100644 --- a/src/system/io.c +++ b/src/system/io.c @@ -44,7 +44,7 @@ char *getFileLocation(char *filename) char *readFile(char *filename) { - char *buffer; + char *buffer = NULL; long length; FILE *file;