mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-03-10 20:31:47 +00: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;
|
delete[] lpValueName;
|
||||||
|
|
||||||
if (res == ERROR_SUCCESS) {
|
if (res == ERROR_SUCCESS) {
|
||||||
lpData[cBuffer] = 0;
|
lpData[cBuffer - 1] = 0;
|
||||||
result = QString::fromWCharArray(lpData);
|
result = QString::fromWCharArray(lpData);
|
||||||
}
|
}
|
||||||
delete[] lpData;
|
delete[] lpData;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user