Bug 16829

Summary: inet_ntoa() reports successful translation for some invalid ip numbers
Product: [Retired] Red Hat Linux Reporter: John Bollinger <jobollin>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-08-23 22:18:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Bollinger 2000-08-23 22:18:17 UTC
inet_ntoa() returns 1 (success) when called with a parameter that is just the initial
part of an IP number.  For instance, it claims to correctly convert each of "129.79.",
"129.79", and "1".  I don't know whether this is the BSD behavior, or whether it is
intended, but it at least doesn't seem to be consistent with the manual, which specifies
that the argument is an Internet host address in "standard numbers-and-dots notation."

Comment 1 Jakub Jelinek 2000-08-24 06:49:07 UTC
The standard does not specify it actually, this behaviour matches
BIND and Solaris behaviour. E.g. Irix accepts a trailing dot as well.