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

Unified Diff: webrtc/api/webrtcsdp.cc

Issue 2354723002: Fixing heap read overflow when "sctp-port" is in a video description. (Closed)
Patch Set: Created 4 years, 3 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/api/webrtcsdp_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/webrtcsdp.cc
diff --git a/webrtc/api/webrtcsdp.cc b/webrtc/api/webrtcsdp.cc
index 7238131cfe9111afa730f1951b682ee3f0b17a3d..4df4ef8566f355c7730962543fceac55ba8d7fab 100644
--- a/webrtc/api/webrtcsdp.cc
+++ b/webrtc/api/webrtcsdp.cc
@@ -2651,6 +2651,11 @@ bool ParseContent(const std::string& message,
return false;
}
} else if (IsDtlsSctp(protocol) && HasAttribute(line, kAttributeSctpPort)) {
+ if (media_type != cricket::MEDIA_TYPE_DATA) {
+ return ParseFailed(
+ line, "sctp-port attribute found in non-data media description.",
+ error);
+ }
int sctp_port;
if (!ParseSctpPort(line, &sctp_port, error)) {
return false;
« no previous file with comments | « no previous file | webrtc/api/webrtcsdp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698