mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 18:56:08 +03:00
Fix potential out-of-bounds access
This commit is contained in:
parent
7696895a88
commit
2c5271b3b2
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ namespace
|
|||
int i = 0;
|
||||
val = static_cast<qreal>(sizeInBytes);
|
||||
|
||||
while ((val >= 1024.) && (i <= static_cast<int>(Utils::Misc::SizeUnit::ExbiByte)))
|
||||
while ((val >= 1024.) && (i < static_cast<int>(Utils::Misc::SizeUnit::ExbiByte)))
|
||||
{
|
||||
val /= 1024.;
|
||||
++i;
|
||||
|
|
Loading…
Reference in a new issue