psd: Don't abort on broken images

oss-fuzz/46418
This commit is contained in:
Albert Astals Cid
2022-04-06 22:58:31 +00:00
parent 84d56d00cf
commit 5c47a97b79
3 changed files with 22 additions and 4 deletions
+10
View File
@@ -0,0 +1,10 @@
/*
SPDX-FileCopyrightText: 2022 Albert Astals Cid <[email protected]>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include <limits>
// QVector uses some extra space for stuff, hence the 32 here suggested by Thiago Macieira
static constexpr int kMaxQVectorSize = std::numeric_limits<int>::max() - 32;