]> git.zerfleddert.de Git - usb-driver/commitdiff
return -1 if pathname passed to accept is a null-pointer.
authorMichael Gernoth <michael@gernoth.net>
Thu, 17 May 2007 17:21:59 +0000 (19:21 +0200)
committerMichael Gernoth <michael@gernoth.net>
Thu, 17 May 2007 18:26:44 +0000 (20:26 +0200)
unbreaks git with libusb-driver.so preloaded

usb-driver.c

index d90952258c070961ca428af69ae90b93b414bbd5..18d6331189750b06a127344f446b04b90601c6ad 100644 (file)
@@ -890,6 +890,9 @@ 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")) {
                return 0;
Impressum, Datenschutz