0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib
Matteo Collina c14e98b476 dgram: copy the list in send
This commit fix a possible crash situation in dgram send().
A crash is possible if an array is passed, and then altered after the
send call, as the call to libuv is wrapped in process.nextTick().
It also avoid sending an empty array to libuv by allocating an empty
buffer. It also does some cleanup inside send() to increase readability.

It removes test flakyness by use common.mustCall and
common.platformTimeout. Fixes situations were some events were not
asserted to be emitted.

Fixes: https://github.com/nodejs/node/issues/6616
PR-URL: https://github.com/nodejs/node/pull/6804
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-26 11:28:45 +02:00
..
internal process: remove deprecated process.EventEmitter 2016-05-24 12:45:30 -04:00
_debug_agent.js lib: refactor code with startsWith/endsWith 2016-03-23 15:58:52 +02:00
_debugger.js debugger: propagate --debug-port= to debuggee 2016-05-25 23:38:10 +02:00
_http_agent.js http: use localAddress instead of path 2016-05-19 12:01:57 +02:00
_http_client.js http: skip body and next message of CONNECT res 2016-04-19 11:48:06 -04:00
_http_common.js http: skip body and next message of CONNECT res 2016-04-19 11:48:06 -04:00
_http_incoming.js http: remove old, confusing comment 2016-02-15 07:52:21 -08:00
_http_outgoing.js http: correct error message for invalid trailer 2016-04-26 22:38:29 -07:00
_http_server.js tools: lint for object literal spacing 2016-05-08 22:45:20 -07:00
_linklist.js
_stream_duplex.js
_stream_passthrough.js
_stream_readable.js events: add prependListener() and prependOnceListener() 2016-04-22 09:28:37 -07:00
_stream_transform.js stream: prevent object map change in TransformState 2016-02-02 13:05:04 -06:00
_stream_wrap.js stream_wrap: error if stream has StringDecoder 2015-12-06 21:55:25 -05:00
_stream_writable.js doc: make writable.setDefaultEncoding() return this 2016-04-30 12:55:46 -04:00
_tls_common.js src: refactor require('constants') 2016-05-17 11:05:18 -07:00
_tls_legacy.js lib: replace legacy uses of __defineGetter__ 2016-05-16 17:01:34 -07:00
_tls_wrap.js tls: catch certCbDone exceptions 2016-05-25 16:07:30 -04:00
.eslintrc tools: add buffer-constructor eslint rule 2016-03-18 17:05:18 -07:00
assert.js assert: allow circular references 2016-04-29 16:52:57 -07:00
buffer.js buffer: fix single digit hex string handling 2016-05-23 15:37:20 +02:00
child_process.js child_process: measure buffer length in bytes 2016-05-25 10:57:59 -07:00
cluster.js cluster: guard against undefined message handlers 2016-05-25 11:58:02 -04:00
console.js console: timeEnd() with no label emits warning 2016-04-25 08:28:23 -07:00
constants.js src: refactor require('constants') 2016-05-17 11:05:18 -07:00
crypto.js src: refactor require('constants') 2016-05-17 11:05:18 -07:00
dgram.js dgram: copy the list in send 2016-05-26 11:28:45 +02:00
dns.js dns: Use object without protoype for map 2016-03-22 11:13:03 -07:00
domain.js lib: reduce usage of self = this 2016-03-21 15:48:51 -07:00
events.js events: pass the original listener added by once 2016-04-29 12:10:50 -07:00
fs.js fs: move mkdtemp* functions near static functions 2016-05-20 08:28:20 -07:00
http.js
https.js crypto: fail early when loading crypto without openssl 2016-03-23 10:34:40 -07:00
module.js src,module: add --preserve-symlinks command line flag 2016-05-13 11:43:47 -07:00
net.js net: introduce Socket#connecting property 2016-04-27 00:41:15 -04:00
os.js src: refactor require('constants') 2016-05-17 11:05:18 -07:00
path.js path: fix basename() regressions 2016-05-18 02:12:28 -04:00
process.js
punycode.js
querystring.js benchmark,test,lib: remove extra spaces 2016-05-11 23:18:16 -07:00
readline.js lib: replace legacy uses of __defineGetter__ 2016-05-16 17:01:34 -07:00
repl.js repl: exports Recoverable 2016-05-12 10:03:06 -04:00
stream.js
string_decoder.js doc: use Buffer.from() instead of new Buffer() 2016-04-27 13:23:41 +08:00
sys.js
timers.js timers: fixing API refs to use safe internal refs 2016-03-28 16:18:14 -07:00
tls.js src: refactor require('constants') 2016-05-17 11:05:18 -07:00
tty.js Revert "tty: don't read from console stream upon creation" 2016-03-29 10:21:46 -05:00
url.js url: drop auth in url.resolve() if host changes 2016-04-25 10:39:10 -07:00
util.js util: pretty-print SIMD types 2016-05-23 12:16:41 +02:00
v8.js v8,src: expose statistics about heap spaces 2016-01-18 11:44:00 -05:00
vm.js
zlib.js zlib: remove _closed in source 2016-05-17 23:28:06 +02:00