New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: fix ArrayBuffer size for zero fill flag #7142

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@addaleax
Member

addaleax commented Jun 3, 2016

Checklist
  • tests and code linting passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

buffer

Description of change

Use sizeof() of the zero fill flag as the byte length of the zeroFill array buffer rather than 1.

This fixes running debug builds, which have boundary checks for typed array creations from native code enabled.

Fixes: #7140

Labelling this this as dont-land-* like #7082 itself.

src: fix ArrayBuffer size for zero fill flag
Use `sizeof()` of the zero fill flag as the byte length of the
`zeroFill` array buffer rather than `1`.

This fixes running debug builds, which have boundary checks for
typed array creations from native code enabled.

Fixes: #7140
@addaleax

This comment has been minimized.

@cjihrig

This comment has been minimized.

Contributor

cjihrig commented Jun 3, 2016

LGTM

@addaleax addaleax referenced this pull request Jun 4, 2016

Closed

buffer: do not crash in Debug build #7148

4 of 4 tasks complete
@indutny

This comment has been minimized.

Member

indutny commented Jun 4, 2016

LGTM

@bnoordhuis

This comment has been minimized.

Member

bnoordhuis commented Jun 4, 2016

Ai, glaringly obvious in hindsight. LGTM.

@seishun

This comment has been minimized.

Member

seishun commented Jun 4, 2016

LGTM

seishun added a commit that referenced this pull request Jun 4, 2016

src: fix ArrayBuffer size for zero fill flag
Use `sizeof()` of the zero fill flag as the byte length of the
`zeroFill` array buffer rather than `1`.

This fixes running debug builds, which have boundary checks for
typed array creations from native code enabled.

PR-URL: #7142
Fixes: #7140
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
@seishun

This comment has been minimized.

Member

seishun commented Jun 4, 2016

Landed in ac0665c.

@seishun seishun closed this Jun 4, 2016

@addaleax addaleax deleted the addaleax:fix-7140 branch Jun 4, 2016

@gibfahn gibfahn referenced this pull request Jun 15, 2017

Closed

Auditing for 6.11.1 #230

2 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment