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

Unified Diff: webrtc/pc/webrtcsdp.cc

Issue 2676293003: Fix SDP parsing crash due to missing track ID in "a=msid". (Closed)
Patch Set: Rebase Created 3 years, 10 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
« no previous file with comments | « no previous file | webrtc/pc/webrtcsdp_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/webrtcsdp.cc
diff --git a/webrtc/pc/webrtcsdp.cc b/webrtc/pc/webrtcsdp.cc
index 93b77274bfc79a3ec550cf400d19d244c31fab45..ed49c344e81f962b42102a4f5cdeede47ef0197b 100644
--- a/webrtc/pc/webrtcsdp.cc
+++ b/webrtc/pc/webrtcsdp.cc
@@ -2136,10 +2136,17 @@ static bool ParseMsidAttribute(const std::string& line,
return ParseFailedExpectFieldNum(line, expected_fields, error);
}
+ if (track_id->empty()) {
+ return ParseFailed(line, "Missing track ID in msid attribute.", error);
+ }
+
// msid:<msid-id>
if (!GetValue(field1, kAttributeMsid, stream_id, error)) {
return false;
}
+ if (stream_id->empty()) {
+ return ParseFailed(line, "Missing stream ID in msid attribute.", error);
+ }
return true;
}
« no previous file with comments | « no previous file | webrtc/pc/webrtcsdp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698