Fix segfault when trying to log into the MP server with an empty password
Probable regression introduced in commit02ab29d2f1
(1.13.14). (cherry-picked from commitfc88cdff3b
)
This commit is contained in:
parent
0228706f31
commit
e7c0a69420
1 changed files with 1 additions and 1 deletions
|
@ -278,7 +278,7 @@ secure_buffer encrypt(const secure_buffer& text, const secure_buffer& key)
|
|||
secure_buffer decrypt(const secure_buffer& text, const secure_buffer& key)
|
||||
{
|
||||
auto buf = rc4_crypt(text, key);
|
||||
while(buf.back() == 0) {
|
||||
while(!buf.empty() && buf.back() == 0) {
|
||||
buf.pop_back();
|
||||
}
|
||||
return buf;
|
||||
|
|
Loading…
Add table
Reference in a new issue