mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
hdr: fix oss-fuzz issue 62197
Fixes the following error: | /src/kimageformats/src/imageformats/hdr.cpp:56:31: runtime error: shift exponent 32 is too large for 32-bit type 'int' | |------------------------------------------------------------------------------------------------------------------------|
This commit is contained in:
parent
a981cefdd2
commit
c3daf86079
@ -53,6 +53,9 @@ static bool Read_Old_Line(uchar *image, int width, QDataStream &s)
|
||||
|
||||
if ((image[0] == 1) && (image[1] == 1) && (image[2] == 1)) {
|
||||
// NOTE: we don't have an image sample that cover this code
|
||||
if (rshift > 31) {
|
||||
return false;
|
||||
}
|
||||
for (i = image[3] << rshift; i > 0 && width > 0; i--) {
|
||||
if (image == start) {
|
||||
return false; // you cannot be here at the first run
|
||||
|
Loading…
Reference in New Issue
Block a user