Browse Source

better check for NULL on access

master
Michael Gernoth 18 years ago
parent
commit
b8b756f5d3
  1. 5
      usb-driver.c

5
usb-driver.c

@ -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);

Loading…
Cancel
Save