Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.5.0, 4.5.1, 4.5.2, 4.5.3, 4.6.0, 4.6.1
-
None
-
Linux -- kubuntu 9.04, gcc 4.3-3, architecture i386 (ia32)
-
0a3ce6fa04ed2b085fe72b89d302a3a5f9e82948
Description
I try to load this image from file by the QImage constructor and by the QImageReader class method "read" and it cause program to hangup.
Possible cause of this is code in qbmphandler.cpp on lines 268-280 (function read_dib_body(QDataStream&, const BMP_INFOHDR&, int, int, QImage& ) ), where you calling calc_shift() function with parameter mask, that was readed from file and may be 0.
Then in calc_shift function at line 147 you use mask in loop condition:
while (!(mask & 1))
{ result++; mask >>= 1; }and if mask == 0 loop condition will newer become 0.