mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-06-03 17:08:08 -04:00
ras: don't assert because we try to allicate a huge vector
oss-fuzz/12915
This commit is contained in:
parent
b072484dbb
commit
039d7d8fbe
@ -121,6 +121,10 @@ static bool LoadRAS(QDataStream &s, const RasHeader &ras, QImage &img)
|
||||
qWarning() << "LoadRAS() mistmatch between height and width" << ras.Width << ras.Height << ras.Length << ras.Depth;
|
||||
return false;
|
||||
}
|
||||
if (ras.Length > std::numeric_limits<int>::max()) {
|
||||
qWarning() << "LoadRAS() unsupported image length in file header" << ras.Length;
|
||||
return false;
|
||||
}
|
||||
|
||||
// each line must be a factor of 16 bits, so they may contain padding
|
||||
// this will be 1 if padding required, 0 otherwise
|
||||
|
Loading…
x
Reference in New Issue
Block a user