Index: ipc/param_traits_read_macros.h |
diff --git a/ipc/param_traits_read_macros.h b/ipc/param_traits_read_macros.h |
index 3fc0ad1f0f05ff4151ff2bcc6ab5dcdcb7cdcfb9..296a84d334e59b3588e7feed5bdd14176b8ddf24 100644 |
--- a/ipc/param_traits_read_macros.h |
+++ b/ipc/param_traits_read_macros.h |
@@ -6,6 +6,7 @@ |
#define IPC_PARAM_TRAITS_READ_MACROS_H_ |
// Null out all the macros that need nulling. |
+#include "base/enum_validation.h" |
#include "ipc/ipc_message_null_macros.h" |
// STRUCT declarations cause corresponding STRUCT_TRAITS declarations to occur. |
@@ -39,6 +40,8 @@ |
int type; \ |
if (!m->ReadInt(iter, &type)) \ |
return false; \ |
+ if (!IsIntValidForEnum<param_type>(type)) \ |
+ return false; \ |
*p = static_cast<param_type>(type); \ |
return true; \ |
} |