diff options
author | Colin Percival <cperciva@FreeBSD.org> | 2008-01-14 22:56:05 +0000 |
---|---|---|
committer | Colin Percival <cperciva@FreeBSD.org> | 2008-01-14 22:56:05 +0000 |
commit | 160e76972a85398e1d8d19143c145cb8a6f6942e (patch) | |
tree | 1b8a86b5a99f9962b4056d9beed2656f413eda11 /lib/libc/inet/inet_network.c | |
parent | 2577760fca906024fed89342686b179a6d28b2c9 (diff) | |
download | src-160e76972a85398e1d8d19143c145cb8a6f6942e.tar.gz src-160e76972a85398e1d8d19143c145cb8a6f6942e.zip |
Fix issues which allow snooping on ptys. [08:01]
Fix an off-by-one error in inet_network(3). [08:02]
Security: FreeBSD-SA-08:01.pty
Security: FreeBSD-SA-08:02.libc
Notes
Notes:
svn path=/head/; revision=175330
Diffstat (limited to 'lib/libc/inet/inet_network.c')
-rw-r--r-- | lib/libc/inet/inet_network.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/inet/inet_network.c b/lib/libc/inet/inet_network.c index b464656369f0..254db41acb2d 100644 --- a/lib/libc/inet/inet_network.c +++ b/lib/libc/inet/inet_network.c @@ -82,9 +82,9 @@ again: } if (!digit) return (INADDR_NONE); + if (pp >= parts + 4 || val > 0xffU) + return (INADDR_NONE); if (*cp == '.') { - if (pp >= parts + 4 || val > 0xffU) - return (INADDR_NONE); *pp++ = val, cp++; goto again; } |