better check for NULL on access
This commit is contained in:
parent
2c6ade7a8a
commit
b8b756f5d3
@ -891,10 +891,7 @@ int access(const char *pathname, int mode) {
|
|||||||
if (!func)
|
if (!func)
|
||||||
func = (int (*) (const char*, int)) dlsym(RTLD_NEXT, "access");
|
func = (int (*) (const char*, int)) dlsym(RTLD_NEXT, "access");
|
||||||
|
|
||||||
if (!pathname)
|
if (pathname && !strcmp(pathname, "/dev/windrvr6")) {
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (!strcmp(pathname, "/dev/windrvr6")) {
|
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return (*func)(pathname, mode);
|
return (*func)(pathname, mode);
|
||||||
|
Reference in New Issue
Block a user