Prevents crashing when ICO file has bad color table value
authorMauri VehniƤinen <ext-mauri.vehniainen@nokia.com>
Fri, 18 Feb 2011 09:10:08 +0000 (10:10 +0100)
committerJason McDonald <jason.mcdonald@nokia.com>
Fri, 18 Feb 2011 13:56:34 +0000 (23:56 +1000)
commitd6c84875227f00b8db85685f53b355d4c58eacd2
tree8d67c735a742a9991aa58abf69a3d8541ac227d5
parent739b8a22ac9f39d0c59df53d99f518cf0553ca55
Prevents crashing when ICO file has bad color table value

When color table value is read from ICO header memory allocation is
made based on this value. This case is relevant only when reading
8bit images. Therefore values over 256 will abort reading the image.

Task-number: QT-4535

Merge-request: 1090
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
(cherry picked from commit d6c1e5d78bdfbeb373970b65d8260f7e9f9ce1bd)
src/plugins/imageformats/ico/qicohandler.cpp