]> cvs.zerfleddert.de Git - usb-driver/blobdiff - usb-driver.c
return -1 if pathname passed to accept is a null-pointer.
[usb-driver] / usb-driver.c
index b230afadc917a73ee45741c1faeca029c8975d26..18d6331189750b06a127344f446b04b90601c6ad 100644 (file)
@@ -245,7 +245,7 @@ int do_wdioctl(int fd, unsigned int request, unsigned char *wdioctl) {
        switch(request & ~(0xc0000000)) {
                case VERSION:
                        version = (struct version_struct*)(wdheader->data);
        switch(request & ~(0xc0000000)) {
                case VERSION:
                        version = (struct version_struct*)(wdheader->data);
-                       strcpy(version->version, "libusb-driver.so $Revision: 1.69 $");
+                       strcpy(version->version, "libusb-driver.so version: " USB_DRIVER_VERSION);
                        version->versionul = 802;
                        DPRINTF("VERSION\n");
                        break;
                        version->versionul = 802;
                        DPRINTF("VERSION\n");
                        break;
@@ -890,6 +890,9 @@ int access(const char *pathname, int mode) {
 
        if (!func)
                func = (int (*) (const char*, int)) dlsym(RTLD_NEXT, "access");
 
        if (!func)
                func = (int (*) (const char*, int)) dlsym(RTLD_NEXT, "access");
+
+       if (!pathname)
+               return -1;
        
        if (!strcmp(pathname, "/dev/windrvr6")) {
                return 0;
        
        if (!strcmp(pathname, "/dev/windrvr6")) {
                return 0;
Impressum, Datenschutz