Index: talk/app/webrtc/webrtcsdp.cc
|
===================================================================
|
--- talk/app/webrtc/webrtcsdp.cc (revision 373)
|
+++ talk/app/webrtc/webrtcsdp.cc (working copy)
|
@@ -1772,10 +1772,22 @@
|
&(session_td->ice_ufrag), error)) {
|
return false;
|
}
|
+ if (session_td->ice_ufrag.length() > 256) {
|
+ return ParseFailed(
|
+ line,
|
+ "ice-ufrag can't be longer than 256 chars",
|
+ error);
|
+ }
|
} else if (HasAttribute(line, kAttributeIcePwd)) {
|
if (!GetValue(line, kAttributeIcePwd, &(session_td->ice_pwd), error)) {
|
return false;
|
}
|
+ if (session_td->ice_pwd.length() > 256) {
|
+ return ParseFailed(
|
+ line,
|
+ "ice-pwd can't be longer than 256 chars",
|
+ error);
|
+ }
|
} else if (HasAttribute(line, kAttributeIceLite)) {
|
session_td->ice_mode = cricket::ICEMODE_LITE;
|
} else if (HasAttribute(line, kAttributeIceOption)) {
|
@@ -2357,10 +2369,22 @@
|
if (!GetValue(line, kAttributeIceUfrag, &transport->ice_ufrag, error)) {
|
return false;
|
}
|
+ if (transport->ice_ufrag.length() > 256) {
|
+ return ParseFailed(
|
+ line,
|
+ "ice-ufrag can't be longer than 256 chars",
|
+ error);
|
+ }
|
} else if (HasAttribute(line, kAttributeIcePwd)) {
|
if (!GetValue(line, kAttributeIcePwd, &transport->ice_pwd, error)) {
|
return false;
|
}
|
+ if (transport->ice_pwd.length() > 256) {
|
+ return ParseFailed(
|
+ line,
|
+ "ice-pwd can't be longer than 256 chars",
|
+ error);
|
+ }
|
} else if (HasAttribute(line, kAttributeIceOption)) {
|
if (!ParseIceOptions(line, &transport->transport_options, error)) {
|
return false;
|