Skip to content

Commit

Permalink
fix segfault on strtol
Browse files Browse the repository at this point in the history
On debian testing usbauth has segfaulted when called
from within udev rules or standalone with 'init' argument.
  • Loading branch information
Cenek Ralis committed Oct 9, 2018
1 parent 51fff06 commit 9a081a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion usbauth/src/usbauth.c
Expand Up @@ -139,7 +139,8 @@ bool match_vals_interface(struct Auth *rule, struct Data *d, struct udev_device
ret = match_valsInt(rule->devcount + 1, d->op, rval);
} else {
lvalStr = usbauth_get_param_valStr(d->param, interface); // get parameter from sysfs
ret = match_vals(lvalStr, d->op, rvalStr);
if (lvalStr)
ret = match_vals(lvalStr, d->op, rvalStr);
}

return ret;
Expand Down

0 comments on commit 9a081a8

Please sign in to comment.