summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/image/qxbmhandler.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/image/qxbmhandler.cpp b/src/gui/image/qxbmhandler.cpp
index 44d07f1624..b21bc75bc4 100644
--- a/src/gui/image/qxbmhandler.cpp
+++ b/src/gui/image/qxbmhandler.cpp
@@ -157,6 +157,7 @@ static bool read_xbm_body(QIODevice *device, int w, int h, QImage *outImage)
} else { // read another line
if ((readBytes = device->readLine(buf,buflen)) <= 0) // EOF ==> truncated image
break;
+ buf[readBytes] = '\0';
p = buf + QByteArray::fromRawData(buf, readBytes).indexOf("0x");
}
}