mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix counting length of leadin for hook name (sizeof () => strlen ()).
Approved by: julian MFC after: 3 days
This commit is contained in:
parent
b521988e6d
commit
880904c323
1 changed files with 1 additions and 1 deletions
|
|
@ -203,7 +203,7 @@ ng_xxx_newhook(node_p node, hook_p hook, const char *name)
|
|||
NG_XXX_HOOK_DLCI_LEADIN, strlen(NG_XXX_HOOK_DLCI_LEADIN)) == 0) {
|
||||
char *eptr;
|
||||
|
||||
cp = name + sizeof(NG_XXX_HOOK_DLCI_LEADIN);
|
||||
cp = name + strlen(NG_XXX_HOOK_DLCI_LEADIN);
|
||||
if (!isdigit(*cp) || (cp[0] == '0' && cp[1] != '\0'))
|
||||
return (EINVAL);
|
||||
dlci = (int)strtoul(cp, &eptr, 10);
|
||||
|
|
|
|||
Loading…
Reference in a new issue