@@ -1427,9 +1427,9 @@ int main(int argc, char *argv[])
int rc;
for (cur = &cfg; cur->next; cur = cur->next) {
- if (strcasecmp(cur->driver, rc_dev.drv_name) && strcasecmp(cur->driver, "*"))
+ if ((!rc_dev.drv_name || strcasecmp(cur->driver, rc_dev.drv_name)) && strcasecmp(cur->driver, "*"))
continue;
- if (strcasecmp(cur->table, rc_dev.keytable_name) && strcasecmp(cur->table, "*"))
+ if ((!rc_dev.keytable_name || strcasecmp(cur->table, rc_dev.keytable_name)) && strcasecmp(cur->table, "*"))
continue;
break;
}
Some dvb-usb drivers do not set a proper module_name in their rc.core struct (e.g. the ttusb2 module and various dib0700 submodules as of 2.6.39). Auto-load mode was segfaulting if trying to match those drivers with a * value. Signed-off-by: Cédric Schieli <cschieli@gmail.com> --- utils/keytable/keytable.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)