| Index: webrtc/pc/webrtcsdp_unittest.cc
|
| diff --git a/webrtc/pc/webrtcsdp_unittest.cc b/webrtc/pc/webrtcsdp_unittest.cc
|
| index 75116e8e33ec5ac5ec5276546ab65b78c0c9ee6f..1a6a212cdd9f0f1ad704088594e8e76cbc285575 100644
|
| --- a/webrtc/pc/webrtcsdp_unittest.cc
|
| +++ b/webrtc/pc/webrtcsdp_unittest.cc
|
| @@ -3446,3 +3446,36 @@ TEST_F(WebRtcSdpTest, DeserializeInvalidPortInCandidateAttribute) {
|
| JsepSessionDescription jdesc_output(kDummyString);
|
| EXPECT_FALSE(SdpDeserialize(kSdpWithInvalidCandidatePort, &jdesc_output));
|
| }
|
| +
|
| +// Test that "a=msid" with a missing track ID is rejected and doesn't crash.
|
| +// Regression test for:
|
| +// https://bugs.chromium.org/p/chromium/issues/detail?id=686405
|
| +TEST_F(WebRtcSdpTest, DeserializeMsidAttributeWithMissingTrackId) {
|
| + static const char kSdpWithMissingTrackId[] =
|
| + "v=0\r\n"
|
| + "o=- 18446744069414584320 18446462598732840960 IN IP4 127.0.0.1\r\n"
|
| + "s=-\r\n"
|
| + "t=0 0\r\n"
|
| + "m=audio 9 RTP/SAVPF 111\r\n"
|
| + "c=IN IP4 0.0.0.0\r\n"
|
| + "a=rtpmap:111 opus/48000/2\r\n"
|
| + "a=msid:stream_id \r\n";
|
| +
|
| + JsepSessionDescription jdesc_output(kDummyString);
|
| + EXPECT_FALSE(SdpDeserialize(kSdpWithMissingTrackId, &jdesc_output));
|
| +}
|
| +
|
| +TEST_F(WebRtcSdpTest, DeserializeMsidAttributeWithMissingStreamId) {
|
| + static const char kSdpWithMissingStreamId[] =
|
| + "v=0\r\n"
|
| + "o=- 18446744069414584320 18446462598732840960 IN IP4 127.0.0.1\r\n"
|
| + "s=-\r\n"
|
| + "t=0 0\r\n"
|
| + "m=audio 9 RTP/SAVPF 111\r\n"
|
| + "c=IN IP4 0.0.0.0\r\n"
|
| + "a=rtpmap:111 opus/48000/2\r\n"
|
| + "a=msid: track_id\r\n";
|
| +
|
| + JsepSessionDescription jdesc_output(kDummyString);
|
| + EXPECT_FALSE(SdpDeserialize(kSdpWithMissingStreamId, &jdesc_output));
|
| +}
|
|
|