Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc

Issue 1218023003: Prevent OOB read on truncated H264 headers. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: use kFuAHeaderSize constant Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
index 8fa83010f6f5760282f5ea3b925c57e84fb274d9..2b8ed6520ec6303d56f7f1f7b232f861a54f49a2 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
@@ -545,4 +545,10 @@ TEST_F(RtpDepacketizerH264Test, TestEmptyPayload) {
EXPECT_FALSE(depacketizer_->Parse(&payload, garbage_ptr, 0));
}
+TEST_F(RtpDepacketizerH264Test, TestTruncatedFuaNalu) {
+ const uint8_t kPayload[] = {0x9c};
+ RtpDepacketizer::ParsedPayload payload;
+ EXPECT_FALSE(depacketizer_->Parse(&payload, kPayload, sizeof(kPayload)));
+}
+
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698