Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
BIND
Commits
f73c8fff
Commit
f73c8fff
authored
Jul 16, 2001
by
Mark Andrews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pullup from BIND 8:
1242. [bug] inet_pton() failed to reject octal input.
parent
bddfe771
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lib/bind/inet/inet_pton.c
lib/bind/inet/inet_pton.c
+4
-2
No files found.
lib/bind/inet/inet_pton.c
View file @
f73c8fff
...
...
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static
const
char
rcsid
[]
=
"$Id: inet_pton.c,v 1.
1
2001/0
3/29
0
6
:31:4
1
marka Exp $"
;
static
const
char
rcsid
[]
=
"$Id: inet_pton.c,v 1.
2
2001/0
7/16
0
3
:31:4
5
marka Exp $"
;
#endif
/* LIBC_SCCS and not lint */
#include "port_before.h"
...
...
@@ -95,10 +95,12 @@ inet_pton4(src, dst)
if
((
pch
=
strchr
(
digits
,
ch
))
!=
NULL
)
{
u_int
new
=
*
tp
*
10
+
(
pch
-
digits
);
if
(
saw_digit
&&
*
tp
==
0
)
return
(
0
);
if
(
new
>
255
)
return
(
0
);
*
tp
=
new
;
if
(
!
saw_digit
)
{
if
(
!
saw_digit
)
{
if
(
++
octets
>
4
)
return
(
0
);
saw_digit
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment