Browse Source

Fix potential out-of-bounds access

adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
fffe5e7003
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/base/utils/misc.cpp

2
src/base/utils/misc.cpp

@ -87,7 +87,7 @@ namespace @@ -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…
Cancel
Save