mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
psd: Don't assert on broken files
oss-fuzz/46407
This commit is contained in:
parent
72fc32aefc
commit
384f78a13c
@ -211,8 +211,11 @@ static PSDImageResourceSection readImageResourceSection(QDataStream &s, bool *ok
|
||||
}
|
||||
|
||||
#ifdef QT_DEBUG
|
||||
if (auto dev = s.device())
|
||||
Q_ASSERT((dev->pos()-pos) == sectioSize);
|
||||
if (auto dev = s.device()) {
|
||||
if ((dev->pos() - pos) != sectioSize) {
|
||||
*ok = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return irs;
|
||||
|
Loading…
Reference in New Issue
Block a user