aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/dtls_handshake.erl
diff options
context:
space:
mode:
authorAndreas Schultz <[email protected]>2013-09-29 13:13:13 +0200
committerAndreas Schultz <[email protected]>2013-09-29 13:13:13 +0200
commitf7093361e9b561091317f7425efb9b1368eb0da5 (patch)
treeea598cc5eb9065e4f06bd696233affe752bde8f4 /lib/ssl/src/dtls_handshake.erl
parent5e2f627736f95380fe1708055e5c6221d5a9bea9 (diff)
downloadotp-f7093361e9b561091317f7425efb9b1368eb0da5.tar.gz
otp-f7093361e9b561091317f7425efb9b1368eb0da5.tar.bz2
otp-f7093361e9b561091317f7425efb9b1368eb0da5.zip
ssl: fix initialization of DTLS fragment reassembler
The DTLS fragment reassembler use a list [{Start, End}] for the fragments. When the first received fragment was not the starting fragment, that list got initialized with [{Start, Length}], causing the merge of following fragment to fail.
Diffstat (limited to 'lib/ssl/src/dtls_handshake.erl')
-rw-r--r--lib/ssl/src/dtls_handshake.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ssl/src/dtls_handshake.erl b/lib/ssl/src/dtls_handshake.erl
index 26e8ce7503..a5bc744154 100644
--- a/lib/ssl/src/dtls_handshake.erl
+++ b/lib/ssl/src/dtls_handshake.erl
@@ -335,7 +335,7 @@ dtls_fragment_init(Length, 0, Length, Body) ->
{Length, [{0, Length}], Body};
dtls_fragment_init(Length, FragmentOffset, FragmentLength, Body) ->
Bin = dtls_fragment_bin_add(FragmentOffset, FragmentLength, Body, <<0:(Length*8)>>),
- {Length, [{FragmentOffset, FragmentLength}], Bin}.
+ {Length, [{FragmentOffset, FragmentOffset + FragmentLength}], Bin}.
dtls_fragment_bin_add(FragmentOffset, FragmentLength, Add, Buffer) ->
<<First:FragmentOffset/bytes, _:FragmentLength/bytes, Rest/binary>> = Buffer,