Index: webrtc/pc/webrtcsdp.cc |
diff --git a/webrtc/pc/webrtcsdp.cc b/webrtc/pc/webrtcsdp.cc |
index d9ed4255aa032baa0688761e7871ee867ba8b68f..bc2ec89645d37e1667444d38b29c837be0d8fd3a 100644 |
--- a/webrtc/pc/webrtcsdp.cc |
+++ b/webrtc/pc/webrtcsdp.cc |
@@ -2719,6 +2719,9 @@ bool ParseContent(const std::string& message, |
if (!GetValueFromString(line, bandwidth, &b, error)) { |
return false; |
} |
+ if (b < 0) { |
+ return ParseFailed(line, "b=AS value can't be negative.", error); |
+ } |
// We should never use more than the default bandwidth for RTP-based |
// data channels. Don't allow SDP to set the bandwidth, because |
// that would give JS the opportunity to "break the Internet". |