From 3eee002c15edabb57e820b2b79d664cacbdbce56 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Thu, 17 May 2007 19:21:59 +0200 Subject: [PATCH 1/1] return -1 if pathname passed to accept is a null-pointer. unbreaks git with libusb-driver.so preloaded --- usb-driver.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.5