diff options
author | julian <julian@FreeBSD.org> | 1999-11-09 00:31:04 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1999-11-09 00:31:04 +0000 |
commit | c173e32dd20dda555dda2506caf0fa18ae69f590 (patch) | |
tree | a1b4ea127ea9edf85895878ee9639855d906e76e /sys | |
parent | 29048c9e3c134f116fda2a6d58b4782b58a30053 (diff) | |
download | FreeBSD-src-c173e32dd20dda555dda2506caf0fa18ae69f590.zip FreeBSD-src-c173e32dd20dda555dda2506caf0fa18ae69f590.tar.gz |
Remove a null pointer reference
Submitted by: Brian Somers (brian@freebsd.org)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netgraph/ng_base.c | 2 | ||||
-rw-r--r-- | sys/netgraph/ng_pppoe.c | 2 | ||||
-rw-r--r-- | sys/netgraph/ng_pppoe.h | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index 50c6ac2..2ab8126 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -424,7 +424,7 @@ ng_decodeidname(const char *name) /* Decode number */ val = strtoul(name + 1, &eptr, 16); if (eptr - name != len - 1 || val == ULONG_MAX || val == 0) - return (0); + return ((ng_ID_t)0); return (ng_ID_t)val; } diff --git a/sys/netgraph/ng_pppoe.c b/sys/netgraph/ng_pppoe.c index 22d5f70..2576750 100644 --- a/sys/netgraph/ng_pppoe.c +++ b/sys/netgraph/ng_pppoe.c @@ -291,6 +291,7 @@ AAA neg->tags[i] = tp; } else { printf("pppoe: asked to add too many tags to packet\n"); + neg->numtags--; } } @@ -1181,6 +1182,7 @@ AAA uniqtag.data.pointer = sp; init_tags(sp); insert_tag(sp, &neg->ac_name.hdr); /* AC_NAME */ + tag = get_tag(ph, PTT_HOST_UNIQ); insert_tag(sp, tag); /* returned hostunique */ insert_tag(sp, &uniqtag.hdr); /* AC cookie */ tag = get_tag(ph, PTT_SRV_NAME); diff --git a/sys/netgraph/ng_pppoe.h b/sys/netgraph/ng_pppoe.h index 53061d1..3a97157 100644 --- a/sys/netgraph/ng_pppoe.h +++ b/sys/netgraph/ng_pppoe.h @@ -94,7 +94,7 @@ struct ngpppoestat { * * When this structure is accepted by the NGM_PPPOE_WAIT command. * If no service is given this is assumed to accept ALL PADI requests. - * This may at some time take a regexp exporession, but not yet. + * This may at some time take a regexp expression, but not yet. * Matching PADI requests will be passed up the named hook. * * |