npa: check if filename to read is non-null

avoids exception on Windows
This commit is contained in:
Frank Morgner
2016-02-17 08:11:42 +01:00
parent 3fe38b0e6d
commit dcf657f343

View File

@@ -312,7 +312,7 @@ int fread_to_eof(const char *file, unsigned char **buf, size_t *buflen)
int r = 0; int r = 0;
unsigned char *p; unsigned char *p;
if (!buflen || !buf) if (!buflen || !buf || !file)
goto err; goto err;
#define MAX_READ_LEN 0xfff #define MAX_READ_LEN 0xfff