Title: Problem with ArrayBuffer bounds checking · Issue #581 · ClearFoundry/ClearScript · GitHub
Open Graph Title: Problem with ArrayBuffer bounds checking · Issue #581 · ClearFoundry/ClearScript
X Title: Problem with ArrayBuffer bounds checking · Issue #581 · ClearFoundry/ClearScript
Description: The following snippet breaks when contents is an empty array. Seems like bounds checking on sourceIndex and offset aren't correct for 0 length ArrayBuffer. public IArrayBuffer CreateJsBuffer(byte[] contents) { var buf = (IArrayBuffer)((S...
Open Graph Description: The following snippet breaks when contents is an empty array. Seems like bounds checking on sourceIndex and offset aren't correct for 0 length ArrayBuffer. public IArrayBuffer CreateJsBuffer(byte[]...
X Description: The following snippet breaks when contents is an empty array. Seems like bounds checking on sourceIndex and offset aren't correct for 0 length ArrayBuffer. public IArrayBuffer CreateJsBuffer(by...
Opengraph URL: https://github.com/ClearFoundry/ClearScript/issues/581
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Problem with ArrayBuffer bounds checking","articleBody":"The following snippet breaks when `contents` is an empty array. Seems like bounds checking on `sourceIndex` and `offset` aren't correct for 0 length ArrayBuffer.\r\n\r\n```csharp\r\n public IArrayBuffer CreateJsBuffer(byte[] contents) {\r\n var buf = (IArrayBuffer)((ScriptObject)engine.Evaluate(\"ArrayBuffer\")).Invoke(true, [contents.Length]);\r\n buf.WriteBytes(contents, 0, (ulong)contents.Length, 0);\r\n return buf;\r\n }\r\n```\r\n```\r\nSpecified argument was out of the range of valid values. (Parameter 'offset') Error: Specified argument was out of the range of valid values. (Parameter 'offset')\r\n```","author":{"url":"https://github.com/raystubbs","@type":"Person","name":"raystubbs"},"datePublished":"2024-06-19T20:31:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/581/ClearScript/issues/581"}
| 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:80588f65-6a24-c9b8-bfcc-733c59db99ef |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B1C8:29FAD7:5756C9:7A4BD1:696A76F9 |
| html-safe-nonce | d1d44d56f2b83cbdab189d1478f5b838e5d1736d2e77c0e8703fac82b3037496 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUM4OjI5RkFENzo1NzU2Qzk6N0E0QkQxOjY5NkE3NkY5IiwidmlzaXRvcl9pZCI6IjUzOTYzMDM2MjUyMjA0MjEzNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 43eeac16c89da39f2656f31bb03b50a7331919e976f3d6f8241c1f7f54bd83c3 |
| hovercard-subject-tag | issue:2363083916 |
| 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/ClearFoundry/ClearScript/581/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9e4c0457d63806e600ba75195bc7de21333185e47cc5bac75e81cd6d52958c2d/ClearFoundry/ClearScript/issues/581 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9e4c0457d63806e600ba75195bc7de21333185e47cc5bac75e81cd6d52958c2d/ClearFoundry/ClearScript/issues/581 |
| og:image:alt | The following snippet breaks when contents is an empty array. Seems like bounds checking on sourceIndex and offset aren't correct for 0 length ArrayBuffer. public IArrayBuffer CreateJsBuffer(byte[]... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | raystubbs |
| hostname | github.com |
| expected-hostname | github.com |
| None | cfa223d62d272274e0b68350b4bd7741f3ca7498b8c4b8b1bc1e6deabbdbc09d |
| turbo-cache-control | no-preview |
| go-import | github.com/ClearFoundry/ClearScript git https://github.com/ClearFoundry/ClearScript.git |
| octolytics-dimension-user_id | 232231756 |
| octolytics-dimension-user_login | ClearFoundry |
| octolytics-dimension-repository_id | 90258367 |
| octolytics-dimension-repository_nwo | ClearFoundry/ClearScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 90258367 |
| octolytics-dimension-repository_network_root_nwo | ClearFoundry/ClearScript |
| 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 | 6a0b6893c221f98f607598e939299fdf5763435d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width