npa: check if filename to read is non-null
avoids exception on Windows
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user