os: fix unlikely buffer overflow in os.type()
authorBen Noordhuis <info@bnoordhuis.nl>
Mon, 15 Apr 2013 18:51:28 +0000 (20:51 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Mon, 15 Apr 2013 18:57:14 +0000 (20:57 +0200)
commit78c5de598bb6ebd68d8d93fabdcebdca1f024580
treefed64ba85ea281af9ac38d3b2bc0937c6d9f5932
parent8ee43006b81b713db1a0ca190f5332edd45121c1
os: fix unlikely buffer overflow in os.type()

* Fix a buffer overflow that happens iff strlen(info.sysname) > 255.
* Check the return value of uname().
src/node_os.cc