mirror of
https://github.com/bellard/quickjs.git
synced 2026-03-31 12:18:01 +00:00
Fix length check in ArrayBuffer.prototype.slice (bnoordhuis) (#451)
This commit is contained in:
parent
7cfddd0664
commit
c6fe5a98fd
@ -55626,7 +55626,7 @@ static JSValue js_array_buffer_slice(JSContext *ctx,
|
||||
goto fail;
|
||||
}
|
||||
/* must test again because of side effects */
|
||||
if (abuf->detached) {
|
||||
if (abuf->detached || abuf->byte_length < start + new_len) {
|
||||
JS_ThrowTypeErrorDetachedArrayBuffer(ctx);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user