diff options
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r-- | sbin/pfctl/parse.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index e1dcfbc382f..2f1cf16252a 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.665 2017/11/14 22:17:41 sashan Exp $ */ +/* $OpenBSD: parse.y,v 1.666 2017/11/25 22:26:25 sashan Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -939,7 +939,7 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto loadrule : LOAD ANCHOR string FROM string { struct loadanchors *loadanchor; - if (strlen(pf->anchor->name) + 1 + + if (strlen(pf->anchor->path) + 1 + strlen($3) >= PATH_MAX) { yyerror("anchorname %s too long, max %u\n", $3, PATH_MAX - 1); @@ -954,7 +954,7 @@ loadrule : LOAD ANCHOR string FROM string { err(1, "loadrule: malloc"); if (pf->anchor->name[0]) snprintf(loadanchor->anchorname, PATH_MAX, - "%s/%s", pf->anchor->name, $3); + "%s/%s", pf->anchor->path, $3); else strlcpy(loadanchor->anchorname, $3, PATH_MAX); if ((loadanchor->filename = strdup($5)) == NULL) |