| Index: src/typedarray.js
|
| diff --git a/src/typedarray.js b/src/typedarray.js
|
| index 591060544a041009c6ddd369778fcc382896ac32..e105afc38e54799c8112320949232a008c835848 100644
|
| --- a/src/typedarray.js
|
| +++ b/src/typedarray.js
|
| @@ -110,7 +110,7 @@ function CreateTypedArrayConstructor(name, elementSize, arrayId, constructor) {
|
| var newLength = TO_POSITIVE_INTEGER(length);
|
| newByteLength = newLength * elementSize;
|
| }
|
| - if (newByteLength > bufferByteLength) {
|
| + if (offset + newByteLength > bufferByteLength) {
|
| throw MakeRangeError("invalid_typed_array_length");
|
| }
|
| %TypedArrayInitialize(obj, arrayId, buffer, offset, newByteLength);
|
|
|