Index: webrtc/p2p/base/stun.cc |
diff --git a/webrtc/p2p/base/stun.cc b/webrtc/p2p/base/stun.cc |
index ac3fd5f9368bda2e7b2b042be87ee4db5e31b09f..180597ee77c11a46e52d379cf1c2fe5d7450291f 100644 |
--- a/webrtc/p2p/base/stun.cc |
+++ b/webrtc/p2p/base/stun.cc |
@@ -132,7 +132,7 @@ const StunUInt16ListAttribute* StunMessage::GetUnknownAttributes() const { |
bool StunMessage::ValidateMessageIntegrity(const char* data, size_t size, |
const std::string& password) { |
// Verifying the size of the message. |
- if ((size % 4) != 0) { |
+ if ((size % 4) != 0 || size < kStunHeaderSize) { |
return false; |
} |