diff options
author | Danil Zagoskin <[email protected]> | 2014-05-10 13:23:06 +0400 |
---|---|---|
committer | Danil Zagoskin <[email protected]> | 2014-05-10 13:23:06 +0400 |
commit | 4c34c06adc8709a6c13e2b5419e66582244040e6 (patch) | |
tree | 369b44b88c9cb829a577aadb43f5dd8c2b10784a /lib/ssh/src/ssh_io.erl | |
parent | aca0b6182b039333b4c963938878d9eecc85e5a1 (diff) | |
download | otp-4c34c06adc8709a6c13e2b5419e66582244040e6.tar.gz otp-4c34c06adc8709a6c13e2b5419e66582244040e6.tar.bz2 otp-4c34c06adc8709a6c13e2b5419e66582244040e6.zip |
ssl: fix max sequence number so it does not overflow
The old value of 18446744073709552000 was calculated using math:pow
which returns float therefore isn't precise. And it would overflow:
erlang:integer_to_list(18446744073709552000, 16) = "10000000000000180"
This patch changes MAX_SEQENCE_NUMBER to value calculated with bitwise
shift:
(1 bsl 64) - 1 = 18446744073709551615
Diffstat (limited to 'lib/ssh/src/ssh_io.erl')
0 files changed, 0 insertions, 0 deletions