Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/net/npf Pull up following revision(s) (requested by c...



details:   https://anonhg.NetBSD.org/src/rev/9757b3554cfd
branches:  netbsd-9
changeset: 744783:9757b3554cfd
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Feb 12 19:41:12 2020 +0000

description:
Pull up following revision(s) (requested by christos in ticket #699):

        sys/net/npf/npf_ruleset.c: revision 1.50

PR/54950: Lloyd Parkes: Avoid NULL deref.

diffstat:

 sys/net/npf/npf_ruleset.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 192d6b273d98 -r 9757b3554cfd sys/net/npf/npf_ruleset.c
--- a/sys/net/npf/npf_ruleset.c Wed Feb 12 19:37:33 2020 +0000
+++ b/sys/net/npf/npf_ruleset.c Wed Feb 12 19:41:12 2020 +0000
@@ -33,7 +33,7 @@
 
 #ifdef _KERNEL
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_ruleset.c,v 1.48.2.1 2019/10/04 08:06:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_ruleset.c,v 1.48.2.2 2020/02/12 19:41:12 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -153,6 +153,9 @@
 void
 npf_ruleset_destroy(npf_ruleset_t *rlset)
 {
+       if (rlset == NULL)
+               return;
+
        size_t len = offsetof(npf_ruleset_t, rs_rules[rlset->rs_slots]);
        npf_rule_t *rl;
 



Home | Main Index | Thread Index | Old Index