Index: webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc |
index 1fa288acad7c3ee570cb19667ebc3146050da6a2..39b64c6ffae87dc7998e5f63cc58edd1cc4af6dd 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.cc |
@@ -10,6 +10,7 @@ |
#include <string> |
+#include "webrtc/base/logging.h" |
#include "webrtc/modules/interface/module_common_types.h" |
#include "webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h" |
@@ -90,6 +91,10 @@ bool RtpDepacketizerGeneric::Parse(ParsedPayload* parsed_payload, |
const uint8_t* payload_data, |
size_t payload_data_length) { |
assert(parsed_payload != NULL); |
+ if (payload_data_length == 0) { |
+ LOG(LS_ERROR) << "Empty payload."; |
+ return false; |
+ } |
uint8_t generic_header = *payload_data++; |
--payload_data_length; |