mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Check for presence of driver name in DRIVER_COUNT_FOUND to prevent strcmp on a null pointer when a driver is not built in.
This commit is contained in:
parent
a715d27a98
commit
32bc746178
@ -3140,7 +3140,7 @@ void usb_cleanup()
|
||||
cgsem_destroy(&usb_resource_sem);
|
||||
}
|
||||
|
||||
#define DRIVER_COUNT_FOUND(X) if (strcasecmp(ptr, X##_drv.name) == 0) { \
|
||||
#define DRIVER_COUNT_FOUND(X) if (X##_drv.name && strcasecmp(ptr, X##_drv.name) == 0) { \
|
||||
drv_count[X##_drv.drv_id].limit = lim; \
|
||||
found = true; \
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user