Index: content/browser/notifications/notification_message_filter.cc |
diff --git a/content/browser/notifications/notification_message_filter.cc b/content/browser/notifications/notification_message_filter.cc |
index 8f22f429515aa8c3fca0dc42b9fcdab6b63b5808..32691565d7f90140b1b43ec38b61f35bcdcf13fe 100644 |
--- a/content/browser/notifications/notification_message_filter.cc |
+++ b/content/browser/notifications/notification_message_filter.cc |
@@ -8,6 +8,7 @@ |
#include "content/browser/bad_message.h" |
#include "content/browser/notifications/page_notification_delegate.h" |
#include "content/browser/notifications/platform_notification_context_impl.h" |
+#include "content/common/notification_constants.h" |
#include "content/common/platform_notification_messages.h" |
#include "content/public/browser/browser_context.h" |
#include "content/public/browser/browser_thread.h" |
@@ -35,6 +36,10 @@ PlatformNotificationData SanitizeNotificationData( |
std::max(kMinimumVibrationDurationMs, pattern)); |
} |
+ // Ensure there aren't more actions than supported. |
+ if (sanitized_data.actions.size() > kPlatformNotificationMaxActions) |
+ sanitized_data.actions.resize(kPlatformNotificationMaxActions); |
+ |
return sanitized_data; |
} |