diff options
author | ume <ume@FreeBSD.org> | 2007-03-01 16:13:56 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2007-03-01 16:13:56 +0000 |
commit | c98add932da4d129e4786d6745bfda311e479a9a (patch) | |
tree | 62c02b5ef38a279b1f48bc46f499941a952d5b96 /usr.sbin | |
parent | c45fdd5d9ffa341e2af4a1ea29d5f3b0973f8ea9 (diff) | |
download | FreeBSD-src-c98add932da4d129e4786d6745bfda311e479a9a.zip FreeBSD-src-c98add932da4d129e4786d6745bfda311e479a9a.tar.gz |
Check the return value from rad_cvt_ipv6prefix().
PR: bin/89808
MFC after: 1 week
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/radius.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/ppp/radius.c b/usr.sbin/ppp/radius.c index 8518396..c26059e 100644 --- a/usr.sbin/ppp/radius.c +++ b/usr.sbin/ppp/radius.c @@ -453,7 +453,13 @@ radius_Process(struct radius *r, int got) #ifndef NOINET6 case RAD_FRAMED_IPV6_PREFIX: free(r->ipv6prefix); - r->ipv6prefix = rad_cvt_ipv6prefix(data, len); + if ((r->ipv6prefix = rad_cvt_ipv6prefix(data, len)) == NULL) { + log_Printf(LogERROR, "rad_cvt_ipv6prefix: %s\n", + "Malformed attribute in response"); + auth_Failure(r->cx.auth); + rad_close(r->cx.rad); + return; + } inet_ntop(AF_INET6, &r->ipv6prefix[2], ipv6addr, sizeof(ipv6addr)); log_Printf(log_IsKept(LogRADIUS) ? LogRADIUS : LogPHASE, " IPv6 %s/%d\n", ipv6addr, r->ipv6prefix[1]); |