From c984f6c94d548f0055790d1c9919feff4996daf4 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 9 Mar 2018 07:51:33 -0800 Subject: [PATCH] Fix masking on continuation frames --- CHANGELOG.md | 6 ++++++ include/boost/beast/websocket/detail/mask.hpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfeae521..2babb0e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Version 164: + +* Fix masking on continuation frames + +-------------------------------------------------------------------------------- + Version 163: * Tidy up calls to post() diff --git a/include/boost/beast/websocket/detail/mask.hpp b/include/boost/beast/websocket/detail/mask.hpp index 651b6328..8958d793 100644 --- a/include/boost/beast/websocket/detail/mask.hpp +++ b/include/boost/beast/websocket/detail/mask.hpp @@ -125,7 +125,7 @@ mask_inplace(boost::asio::mutable_buffer& b, prepared_key& key) { for(std::size_t i = 0; i < n; ++i) p[i] ^= mask[i]; - rol(key, 4 - n); + rol(key, n); } }