Title: dgram: socket.send() crash when input array is modified · Issue #6616 · nodejs/node · GitHub
Open Graph Title: dgram: socket.send() crash when input array is modified · Issue #6616 · nodejs/node
X Title: dgram: socket.send() crash when input array is modified · Issue #6616 · nodejs/node
Description: #4374 introduces a bug: it makes socket.send() accept an array but it's not resilient against that array getting modified afterwards: $ node -e ' var a = ["boom!"], s = dgram.createSocket("udp4"); s.send(a, 1234); a.splice(0); ' node: .....
Open Graph Description: #4374 introduces a bug: it makes socket.send() accept an array but it's not resilient against that array getting modified afterwards: $ node -e ' var a = ["boom!"], s = dgram.createSocket("udp4"); ...
X Description: #4374 introduces a bug: it makes socket.send() accept an array but it's not resilient against that array getting modified afterwards: $ node -e ' var a = ["boom!"], s = dgram.crea...
Opengraph URL: https://github.com/nodejs/node/issues/6616
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"dgram: socket.send() crash when input array is modified","articleBody":"#4374 introduces a bug: it makes `socket.send()` accept an array but it's not resilient against that array getting modified afterwards:\n\n```\n$ node -e '\n var a = [\"boom!\"], s = dgram.createSocket(\"udp4\");\n s.send(a, 1234);\n a.splice(0);\n'\nnode: ../deps/uv/src/unix/udp.c:390: uv__udp_send: Assertion `nbufs \u003e 0' failed.\nAborted (core dumped)\n```\n\nA secondary issue with #4374 is that it penalizes the common case of passing in a buffer by always wrapping it in an array.\n\n/cc @mcollina @jasnell\n","author":{"url":"https://github.com/bnoordhuis","@type":"Person","name":"bnoordhuis"},"datePublished":"2016-05-06T09:40:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/6616/node/issues/6616"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0f63b93a-bac9-6425-41c4-8925fe6f9dce |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E5BA:391A54:F9DD07:158A3C7:6A4DD8FA |
| html-safe-nonce | 069c3797545d11f563562e62a0a9551351a013682a4578c9b924947d60d24464 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUJBOjM5MUE1NDpGOUREMDc6MTU4QTNDNzo2QTRERDhGQSIsInZpc2l0b3JfaWQiOiIzMTU2MjIzODU4MTc3ODU3Nzg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d3bb518b6c99eb7f0c30db22e9205234ab99fbf4ba4824a52ee25a305128389f |
| hovercard-subject-tag | issue:153415724 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/6616/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8f46a15e76dd42831ec63fc8759490e714510f942c700236c3dbc1e9ebf75a38/nodejs/node/issues/6616 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8f46a15e76dd42831ec63fc8759490e714510f942c700236c3dbc1e9ebf75a38/nodejs/node/issues/6616 |
| og:image:alt | #4374 introduces a bug: it makes socket.send() accept an array but it's not resilient against that array getting modified afterwards: $ node -e ' var a = ["boom!"], s = dgram.createSocket("udp4"); ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bnoordhuis |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width