os: handle 256 character hostnames
authorBen Noordhuis <info@bnoordhuis.nl>
Mon, 15 Apr 2013 19:05:20 +0000 (21:05 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Mon, 15 Apr 2013 19:13:29 +0000 (21:13 +0200)
commitafbaddecd37a77d9304f55e440bc6c741516b580
tree62e6221efb99a59edec1475c3d29987f94742925
parent78c5de598bb6ebd68d8d93fabdcebdca1f024580
os: handle 256 character hostnames

Fix a (rather academic) buffer overflow. MAXHOSTNAMELEN is 256 on most
platforms, which means the buffer wasn't big enough to hold the
trailing nul byte on a system with a maximum length hostname.
src/node_os.cc