1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Use a less restrictive check

(some rmaps contain tiles with exceeding image data)
This commit is contained in:
Martin Tůma 2019-03-09 12:09:43 +01:00
parent 46d6fbe5de
commit b58adc5486

View File

@ -354,7 +354,7 @@ QPixmap RMap::tile(int x, int y)
if (stream.readRawData(ba.data() + sizeof(bes), size) != (int)size)
return QPixmap();
QByteArray uba = qUncompress(ba);
if (uba.size() != tileSize.width() * tileSize.height())
if (uba.size() < tileSize.width() * tileSize.height())
return QPixmap();
QImage img((const uchar*)uba.constData(), tileSize.width(),
tileSize.height(), QImage::Format_Indexed8);