Fix: Sudden exit on bookmarking a new (not saved) file (Bug #2599802)
Safer SecString::overwrite(QString&) git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@261 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -85,10 +85,9 @@ void SecString::overwrite(unsigned char* str, int strlen){
|
||||
}
|
||||
|
||||
void SecString::overwrite(QString& str){
|
||||
if(str.length()==0)
|
||||
return;
|
||||
|
||||
overwrite((unsigned char*)str.data(), str.capacity());
|
||||
for (int i=0; i<str.length(); i++) {
|
||||
str[i] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
void SecString::generateSessionKey(){
|
||||
|
||||
Reference in New Issue
Block a user