aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/include
diff options
context:
space:
mode:
authorAnders Svensson <anders@erlang.org>2015-04-03 11:17:58 +0200
committerAnders Svensson <anders@erlang.org>2015-04-03 11:55:04 +0200
commit1732c9c9bd6b261cb18f2ff174a8c4d1b9488f3e (patch)
tree79e9b814450318ef5dcc0534b60be6a174e4e33d /lib/diameter/include
parent545890576542e4be630df8772654b99bd0306f62 (diff)
downloadotp-1732c9c9bd6b261cb18f2ff174a8c4d1b9488f3e.tar.gz
otp-1732c9c9bd6b261cb18f2ff174a8c4d1b9488f3e.tar.bz2
otp-1732c9c9bd6b261cb18f2ff174a8c4d1b9488f3e.zip
Remove extra avp bit from diameter_avp decode
In the case of a faulty AVP Length (pointing past the end of a message or not spanning the header), an extra bit is prepended to data bytes in diameter_avp:collect_avps/1 in order to force a 5014 decode error. The bit is supposed to be removed as part of the decode in diameter_gen.hrl but this didn't happen in case of an AVP that unknown to the dictionary in question.
Diffstat (limited to 'lib/diameter/include')
-rw-r--r--lib/diameter/include/diameter_gen.hrl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/diameter/include/diameter_gen.hrl b/lib/diameter/include/diameter_gen.hrl
index 0eef218a07..e8ffe7f92c 100644
--- a/lib/diameter/include/diameter_gen.hrl
+++ b/lib/diameter/include/diameter_gen.hrl
@@ -445,7 +445,7 @@ reset(_, _) ->
%% undecoded. Note that the type field is 'undefined' in this case.
decode_AVP(Name, Avp, {Avps, Acc}) ->
- {[Avp | Avps], pack_AVP(Name, Avp, Acc)}.
+ {[trim(Avp) | Avps], pack_AVP(Name, Avp, Acc)}.
%% rc/1