Skip to content

Commit 0135c0e

Browse files
author
Patrick Soquet
committed
compare dispatch table, not slot, check detached
1 parent 9000f3b commit 0135c0e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

xs/sources/xsDataView.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,6 +2326,8 @@ void fx_TypedArray_prototype_set(txMachine* the)
23262326
else
23272327
mxPushUndefined();
23282328
if (dispatch->value.typedArray.dispatch == sourceDispatch->value.typedArray.dispatch) {
2329+
if (data->value.arrayBuffer.address == C_NULL)
2330+
mxTypeError("detached buffer");
23292331
c_memcpy(data->value.arrayBuffer.address + offset, sourceData->value.arrayBuffer.address + sourceOffset, limit - offset);
23302332
mxMeterSome(((txU4)(limit - offset)) * 2);
23312333
}

0 commit comments

Comments
 (0)