mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-04-12 04:42:44 -04:00
IFF: fix Integer-overflow in IDATChunk::strideSize
This commit is contained in:
@ -3092,7 +3092,8 @@ quint32 IDATChunk::strideSize(const IHDRChunk *header) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto rs = (header->width() * header->depth() + 7) / 8;
|
||||
// width() and depth() are at most 65535
|
||||
auto rs = (quint32(header->width()) * header->depth() + 7) / 8;
|
||||
|
||||
// No padding bytes are inserted in the data.
|
||||
if (header->model() == IHDRChunk::Rgb888) {
|
||||
|
||||
Reference in New Issue
Block a user