diff options
author | Kristof Provost <kp@FreeBSD.org> | 2023-01-24 06:46:46 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2023-01-24 06:46:46 +0000 |
commit | cd80c52cade3e38d273eecec6f9b0a7cba23bcc8 (patch) | |
tree | 8b32376fd5f7362a9cdc905f6bfd71bd7540ac3d /sbin/pfctl | |
parent | da81cc6035f8283b6adda1ef466977e8c1c5389e (diff) | |
download | src-cd80c52cade3e38d273eecec6f9b0a7cba23bcc8.tar.gz src-cd80c52cade3e38d273eecec6f9b0a7cba23bcc8.zip |
pfctl: rule.label is a two-dimensional array
Fix checking for a non-empty first string.
PR: 269075
MFC after: 1 week
Reported by: nreilly@blackberry.com
Diffstat (limited to 'sbin/pfctl')
-rw-r--r-- | sbin/pfctl/pfctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 37c9625492b1..f60e3f67e082 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1309,7 +1309,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, case PFCTL_SHOW_LABELS: break; case PFCTL_SHOW_RULES: - if (rule.label[0] && (opts & PF_OPT_SHOWALL)) + if (rule.label[0][0] && (opts & PF_OPT_SHOWALL)) labels = 1; print_rule(&rule, anchor_call, rule_numbers, numeric); printf("\n"); @@ -1363,7 +1363,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, break; } case PFCTL_SHOW_RULES: - if (rule.label[0] && (opts & PF_OPT_SHOWALL)) + if (rule.label[0][0] && (opts & PF_OPT_SHOWALL)) labels = 1; INDENT(depth, !(opts & PF_OPT_VERBOSE)); print_rule(&rule, anchor_call, rule_numbers, numeric); |