mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 23:42:46 -07:00
Fix potential out-of-bounds access
This commit is contained in:
parent
c8e8a44747
commit
fffe5e7003
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…
Add table
Add a link
Reference in a new issue