Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: src/d8.cc

Issue 1216853003: Fix cluster-fuzz found regression in d8 Workers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-505778.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 94795cb8360f7d115099f8969e7ad043bc0575ba..4c6060b948849e3333ea96f4544b4f4a381e7bf4 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1578,8 +1578,10 @@ SerializationTag SerializationData::ReadTag(int* offset) const {
void SerializationData::ReadMemory(void* p, int length, int* offset) const {
- memcpy(p, &data[*offset], length);
- (*offset) += length;
+ if (length > 0) {
+ memcpy(p, &data[*offset], length);
+ (*offset) += length;
+ }
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-505778.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698