mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Fix possible race conditions in msgid().
This commit is contained in:
@@ -118,8 +118,10 @@ void ComputeInstallationTag() {
|
||||
file.close();
|
||||
}
|
||||
if (!InstallationTag) {
|
||||
auto generator = std::mt19937(std::random_device()());
|
||||
auto distribution = std::uniform_int_distribution<uint64>();
|
||||
do {
|
||||
memsetrnd_bad(InstallationTag);
|
||||
InstallationTag = distribution(generator);
|
||||
} while (!InstallationTag);
|
||||
|
||||
if (file.open(QIODevice::WriteOnly)) {
|
||||
|
Reference in New Issue
Block a user