aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-03-26 12:52:04 +0100
committerAnders Svensson <[email protected]>2015-03-27 07:21:27 +0100
commit7edb0dd681b09df8865855eda1150e4a92b54a0a (patch)
treef5d7d062568fa6c94fcf9d33230b7e38acd1e7ee /lib/diameter/test
parentf3e95a4d4278fda5a0648943020bdf0026219f7c (diff)
downloadotp-7edb0dd681b09df8865855eda1150e4a92b54a0a.tar.gz
otp-7edb0dd681b09df8865855eda1150e4a92b54a0a.tar.bz2
otp-7edb0dd681b09df8865855eda1150e4a92b54a0a.zip
Limit FQDN in DiameterURI to 255 octets
As for the port number in the parent commit, a FQDN can't be arbitrarily long, at most 255 octets. Make decode fail if it's more.
Diffstat (limited to 'lib/diameter/test')
-rw-r--r--lib/diameter/test/diameter_codec_test.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/diameter/test/diameter_codec_test.erl b/lib/diameter/test/diameter_codec_test.erl
index 11fa82cfa1..5f1dbfbd61 100644
--- a/lib/diameter/test/diameter_codec_test.erl
+++ b/lib/diameter/test/diameter_codec_test.erl
@@ -358,11 +358,13 @@ values('DiameterURI') ->
Pr <- ["" | [";protocol=" ++ X
|| X <- ["diameter","radius","tacacs+"]]],
Tr /= ";transport=udp"
- orelse (Pr /= ";protocol=diameter" andalso Pr /= "")],
+ orelse (Pr /= ";protocol=diameter" andalso Pr /= "")]
+ ++ ["aaa://" ++ lists:duplicate(255, $x)],
["aaa://diameter.se:65536",
"aaa://diameter.se:-1",
"aaa://diameter.se;transport=udp;protocol=diameter",
"aaa://diameter.se;transport=udp",
+ "aaa://" ++ lists:duplicate(256, $x),
"aaa://:3868",
"aaax://diameter.se",
"aaa://diameter.se;transport=tcpx",