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

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

Issue 1219493004: Prevent size_t underflow in H264 SPS parsing. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 7bf1cf1b6f8e783d7f0c2f90aa95c460b276b711..3ad5686fe9ee4223e965dd16df9f2cbadef4605a 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc
@@ -563,4 +563,10 @@ TEST_F(RtpDepacketizerH264Test, TestTruncationJustAfterSingleStapANalu) {
EXPECT_FALSE(depacketizer_->Parse(&payload, kPayload, sizeof(kPayload)));
}
+TEST_F(RtpDepacketizerH264Test, TestShortSpsPacket) {
+ const uint8_t kPayload[] = {0x27, 0x80, 0x00};
+ RtpDepacketizer::ParsedPayload payload;
+ EXPECT_TRUE(depacketizer_->Parse(&payload, kPayload, sizeof(kPayload)));
+}
+
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698