mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-19 12:08:23 -05:00
CipherSettings: fix crash with empty RawKey
Fix crash when CipherSettings::getPassword() is called with empty RawKey. Related issue #2743
This commit is contained in:
@@ -16,7 +16,11 @@ std::string CipherSettings::getPassword() const
|
||||
return sqlb::escapeString(password);
|
||||
} else {
|
||||
// Remove the '0x' part at the beginning
|
||||
return "\"x'" + password.substr(2) + "'\"";
|
||||
if (password.length() > 2) {
|
||||
return "\"x'" + password.substr(2) + "'\"";
|
||||
}
|
||||
|
||||
return "''";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user