diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2010-01-26 09:55:31 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond@trolltech.com> | 2010-01-26 09:56:45 (GMT) |
commit | 0a3ce6fa04ed2b085fe72b89d302a3a5f9e82948 (patch) | |
tree | 9f8ed10defc9adcb919e131384e0f68dcddbf004 /src/gui/image | |
parent | ab96a3edd9a7f84dc055a9818ab60bc961a8b6c8 (diff) | |
download | Qt-0a3ce6fa04ed2b085fe72b89d302a3a5f9e82948.zip Qt-0a3ce6fa04ed2b085fe72b89d302a3a5f9e82948.tar.gz Qt-0a3ce6fa04ed2b085fe72b89d302a3a5f9e82948.tar.bz2 |
Fixed an infinite loop that could occur when reading invalid BMP images.
Task-number: QTBUG-7530
Reviewed-by: Kim
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qbmphandler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp index 854be2e..42e19b8 100644 --- a/src/gui/image/qbmphandler.cpp +++ b/src/gui/image/qbmphandler.cpp @@ -144,7 +144,7 @@ static QDataStream &operator<<(QDataStream &s, const BMP_INFOHDR &bi) static int calc_shift(int mask) { int result = 0; - while (!(mask & 1)) { + while (mask && !(mask & 1)) { result++; mask >>= 1; } |