mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-09-28 08:32:04 -04:00
Added limit to maximum number of channels
This commit is contained in:
committed by
Mirco Miranda
parent
8bfdef2e48
commit
52045ff84d
@@ -105,7 +105,7 @@ static bool IsSupported(const QoiHeader &head)
|
||||
return false;
|
||||
}
|
||||
// Check if the header is a valid QOI header
|
||||
if (head.Width == 0 || head.Height == 0 || head.Channels < 3 || head.Colorspace > 1) {
|
||||
if (head.Width == 0 || head.Height == 0 || head.Channels < 3 || head.Channels > 4 || head.Colorspace > 1) {
|
||||
return false;
|
||||
}
|
||||
// Set a reasonable upper limit
|
||||
|
||||
Reference in New Issue
Block a user