Commit 4e28efbd authored by mbarbella's avatar mbarbella Committed by Commit bot

Add validation to ui::PageTransition.

Part of this is used as a bitmask, but in some cases we assume that the
core part is <= |PAGE_TRANSITION_LAST_CORE|.

See: https://cluster-fuzz.appspot.com/testcase?key=4815416552062976

R=tsepez@chromium.org

BUG=450268

Review URL: https://codereview.chromium.org/945973002

Cr-Commit-Position: refs/heads/master@{#317458}
parent f6aad405
...@@ -28,7 +28,10 @@ ...@@ -28,7 +28,10 @@
#undef IPC_MESSAGE_EXPORT #undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
IPC_ENUM_TRAITS(ui::PageTransition) // Bitmask. IPC_ENUM_TRAITS_VALIDATE(ui::PageTransition,
((value &
ui::PageTransition::PAGE_TRANSITION_CORE_MASK) <=
ui::PageTransition::PAGE_TRANSITION_LAST_CORE))
IPC_ENUM_TRAITS_MAX_VALUE(net::NetworkChangeNotifier::ConnectionType, IPC_ENUM_TRAITS_MAX_VALUE(net::NetworkChangeNotifier::ConnectionType,
net::NetworkChangeNotifier::CONNECTION_LAST) net::NetworkChangeNotifier::CONNECTION_LAST)
IPC_ENUM_TRAITS_MAX_VALUE(content::ConsoleMessageLevel, IPC_ENUM_TRAITS_MAX_VALUE(content::ConsoleMessageLevel,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment