From dcf657f3438b0722043215b3ff3d85b0a0ccfef5 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Wed, 17 Feb 2016 08:11:42 +0100 Subject: [PATCH] npa: check if filename to read is non-null avoids exception on Windows --- npa/src/scutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npa/src/scutil.c b/npa/src/scutil.c index 3566332..d737c24 100644 --- a/npa/src/scutil.c +++ b/npa/src/scutil.c @@ -312,7 +312,7 @@ int fread_to_eof(const char *file, unsigned char **buf, size_t *buflen) int r = 0; unsigned char *p; - if (!buflen || !buf) + if (!buflen || !buf || !file) goto err; #define MAX_READ_LEN 0xfff