mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-01-06 15:04:34 +08:00
Fix heap corruption. Closes #2342.
Fix heap corruption during Registry access.
This commit is contained in:
parent
f851875ad1
commit
b45eb28099
@ -1394,7 +1394,7 @@ QString getRegValue(HKEY handle, const QString &name = QString())
|
||||
delete[] lpValueName;
|
||||
|
||||
if (res == ERROR_SUCCESS) {
|
||||
lpData[cBuffer] = 0;
|
||||
lpData[cBuffer - 1] = 0;
|
||||
result = QString::fromWCharArray(lpData);
|
||||
}
|
||||
delete[] lpData;
|
||||
|
Loading…
Reference in New Issue
Block a user