Fix segfault when trying to log into the MP server with an empty password
Probable regression introduced in commit
02ab29d2f1
(1.13.14).
This commit is contained in:
parent
9646434bc1
commit
1e67b2616f
2 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
|||
## Version 1.13.14+dev
|
||||
### Language and i18n
|
||||
* Updated translations: French, Galician
|
||||
### Multiplayer
|
||||
* Fixed regression causing a crash-to-desktop when trying to log into the
|
||||
server using a registered and active account without specifying a
|
||||
password.
|
||||
### User Interface
|
||||
* Implemented MP chat message history saving (issue #1194, issue #2802).
|
||||
### Miscellaneous and bug fixes
|
||||
|
|
|
@ -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