Chromium Code Reviews| 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 66a19ddf5696a05bf26fae07499655487620bd1c..8fa83010f6f5760282f5ea3b925c57e84fb274d9 100644 |
| --- a/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc |
| +++ b/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc |
| @@ -537,4 +537,12 @@ TEST_F(RtpDepacketizerH264Test, TestFuA) { |
| EXPECT_EQ(kH264FuA, payload.type.Video.codecHeader.H264.packetization_type); |
| EXPECT_EQ(kIdr, payload.type.Video.codecHeader.H264.nalu_type); |
| } |
| + |
| +TEST_F(RtpDepacketizerH264Test, TestEmptyPayload) { |
|
stefan-webrtc
2015/06/30 10:20:03
Seems like we may want to have a few generic tests
pbos-webrtc
2015/06/30 11:22:05
No, since they are different formats the only thin
|
| + // Using a wild pointer to crash on accesses from inside the depacketizer. |
| + uint8_t* garbage_ptr = reinterpret_cast<uint8_t*>(0x4711); |
| + RtpDepacketizer::ParsedPayload payload; |
| + EXPECT_FALSE(depacketizer_->Parse(&payload, garbage_ptr, 0)); |
| +} |
| + |
| } // namespace webrtc |