From: Michael Gernoth Date: Thu, 17 May 2007 17:21:59 +0000 (+0200) Subject: return -1 if pathname passed to accept is a null-pointer. X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver/commitdiff_plain/3eee002c15edabb57e820b2b79d664cacbdbce56?ds=sidebyside return -1 if pathname passed to accept is a null-pointer. unbreaks git with libusb-driver.so preloaded --- diff --git a/usb-driver.c b/usb-driver.c index d909522..18d6331 100644 --- a/usb-driver.c +++ b/usb-driver.c @@ -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;