net: add a port validation to `connect`
authorMaciej Małecki <me@mmalecki.com>
Wed, 4 Sep 2013 22:57:43 +0000 (18:57 -0400)
committerBen Noordhuis <info@bnoordhuis.nl>
Thu, 19 Sep 2013 10:38:29 +0000 (12:38 +0200)
commitd80d131c75d7defa06845d7daa634c4d51515e0c
tree650b0b8381be8ea59e5f168e7915b6616fa5f6aa
parenta1cf3ada624b90673ac6bd53ec38a3d27fecbd01
net: add a port validation to `connect`

Fix "Assertion failed" when trying to connect to non-int ports:

    Assertion failed: (args[2]->Uint32Value()), function Connect,
    file ../src/tcp_wrap.cc, line 379.
    Abort trap: 6
lib/net.js
test/simple/test-net-create-connection.js