1
0

better check for NULL on access

This commit is contained in:
Michael Gernoth 2007-05-19 15:15:27 +02:00
parent 2c6ade7a8a
commit b8b756f5d3

View File

@ -891,10 +891,7 @@ int access(const char *pathname, int mode) {
if (!func)
func = (int (*) (const char*, int)) dlsym(RTLD_NEXT, "access");
if (!pathname)
return -1;
if (!strcmp(pathname, "/dev/windrvr6")) {
if (pathname && !strcmp(pathname, "/dev/windrvr6")) {
return 0;
} else {
return (*func)(pathname, mode);