This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug network/16637] inet_pton function is accepting IPv6 with bad format


https://sourceware.org/bugzilla/show_bug.cgi?id=16637

--- Comment #3 from Avi Lachmish <alachmish at trustwave dot com> ---
The RFC 2373 contains an ABNF Description of Text Representations where I quote 

  This appendix defines the text representation of IPv6 addresses and
   prefixes in Augmented BNF [ABNF] for reference purposes.

      IPv6address = hexpart [ ":" IPv4address ]
      IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT

      IPv6prefix  = hexpart "/" 1*2DIGIT

      hexpart = hexseq | hexseq "::" [ hexseq ] | "::" [ hexseq ]
      hexseq  = hex4 *( ":" hex4)
      hex4    = 1*4HEXDIG

which means that each sequence is build from 4 hex digits

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]