Skip to content

Commit ca13f7a

Browse files
committed
deps: V8: cherry-pick 501482cbc704
Original commit message: Fix ValueDeserializer::ReadDouble() bounds check If end_ is smaller than sizeof(double), the result would wrap around, and lead to an invalid memory access. Refs: #37978 Change-Id: Ibc8ddcb0c090358789a6a02f550538f91d431c1d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2801353 Reviewed-by: Marja Hölttä <[email protected]> Commit-Queue: Marja Hölttä <[email protected]> Cr-Commit-Position: refs/heads/master@{#73800} PR-URL: #38121 Fixes: #37978 Refs: v8/v8@501482cbc704 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent dfe3f95 commit ca13f7a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.8',
39+
'v8_embedder_string': '-node.9',
4040

4141
##### V8 defaults for Node.js #####
4242

Diff for: deps/v8/src/objects/value-serializer.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,8 @@ Maybe<T> ValueDeserializer::ReadZigZag() {
11901190

11911191
Maybe<double> ValueDeserializer::ReadDouble() {
11921192
// Warning: this uses host endianness.
1193-
if (position_ > end_ - sizeof(double)) return Nothing<double>();
1193+
if (sizeof(double) > static_cast<unsigned>(end_ - position_))
1194+
return Nothing<double>();
11941195
double value;
11951196
base::Memcpy(&value, position_, sizeof(double));
11961197
position_ += sizeof(double);

0 commit comments

Comments
 (0)