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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp

Issue 2731183002: V8ScriptValueDeserializer: Fix off-by-one issue in length comparison. (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp b/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp
index 726030fed014917838338ca488c087a69036f1fc..516ec902c1aa37efdce1418070c8f6eb78751b06 100644
--- a/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp
@@ -54,7 +54,7 @@ size_t readVersionEnvelope(SerializedScriptValue* serializedScriptValue,
unsigned shift = 0;
bool hasAnotherByte;
do {
- if (i > length)
+ if (i >= length)
return 0;
uint8_t byte = rawData[i];
if (LIKELY(shift < 32)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698