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

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

Issue 2742713004: Check for invalid element id when deserializing CompositorProxyTag (Closed)
Patch Set: Address nits 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 | third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp » ('j') | 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 516ec902c1aa37efdce1418070c8f6eb78751b06..1d9fc82d3c758b7eae9c2bc8be836b79122b663f 100644
--- a/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp
@@ -208,8 +208,8 @@ ScriptWrappable* V8ScriptValueDeserializer::readDOMObject(
const uint32_t validPropertiesMask = static_cast<uint32_t>(
(1u << CompositorMutableProperty::kNumProperties) - 1);
if (!RuntimeEnabledFeatures::compositorWorkerEnabled() ||
- !readUint64(&element) || !readUint32(&properties) || !properties ||
- (properties & ~validPropertiesMask))
+ !readUint64(&element) || !readUint32(&properties) || element == 0 ||
+ !properties || (properties & ~validPropertiesMask))
return nullptr;
return CompositorProxy::create(m_scriptState->getExecutionContext(),
element, properties);
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698