Files
node/lib
Ben Noordhuis 0c2960ef4a dgram: fix assertion on bad send() arguments
Add range checks for the offset, length and port arguments to
dgram.Socket#send().  Fixes the following assertion:

    node: ../../src/udp_wrap.cc:264: static v8::Handle<v8::Value>
    node::UDPWrap::DoSend(const v8::Arguments&, int): Assertion
    `offset < Buffer::Length(buffer_obj)' failed.

And:

    node: ../../src/udp_wrap.cc:265: static v8::Handle<v8::Value>
    node::UDPWrap::DoSend(const v8::Arguments&, int): Assertion
    `length <= Buffer::Length(buffer_obj) - offset' failed.

Interestingly enough, a negative port number was accepted until now but
silently ignored.  (In other words, it would send the datagram to a
random port.)

This commit exposed a bug in the simple/test-dgram-close test which
has also been fixed.

This is a back-port of commit 41ec6d0 from the master branch.

Fixes #6025.
2013-08-17 17:11:02 +02:00
..
2011-03-14 17:37:05 -07:00
2013-05-14 11:36:04 -07:00
2013-04-11 11:06:20 -07:00
2011-03-14 17:37:05 -07:00
2013-03-06 14:31:22 +04:00
2011-03-14 17:37:05 -07:00
2013-06-16 19:06:27 -07:00
2013-02-22 16:30:27 -08:00
2013-01-16 16:53:11 +01:00
2013-05-30 14:41:00 +02:00
2012-06-28 10:14:03 -07:00
2013-07-14 20:08:07 -07:00
2013-02-28 23:11:47 +01:00
2013-03-06 11:44:29 -08:00
2012-03-03 23:48:57 -08:00