Index: src/value-serializer.cc |
diff --git a/src/value-serializer.cc b/src/value-serializer.cc |
index 69b958292e39085e0db735314b70dc6e8d90a6b4..94152bcf2a2b369e801c65d602d75bd6803bc7b9 100644 |
--- a/src/value-serializer.cc |
+++ b/src/value-serializer.cc |
@@ -1410,7 +1410,8 @@ MaybeHandle<JSArrayBufferView> ValueDeserializer::ReadJSArrayBufferView( |
TYPED_ARRAYS(TYPED_ARRAY_CASE) |
#undef TYPED_ARRAY_CASE |
} |
- if (byte_offset % element_size != 0 || byte_length % element_size != 0) { |
+ if (element_size == 0 || byte_offset % element_size != 0 || |
+ byte_length % element_size != 0) { |
return MaybeHandle<JSArrayBufferView>(); |
} |
Handle<JSTypedArray> typed_array = isolate_->factory()->NewJSTypedArray( |