OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d6efaf
)
QIODevice::read() cannot overflow in read_xpm_string()
author
Ivailo Monev
<xakepa10@gmail.com>
Wed, 4 Aug 2021 19:36:01 +0000
(22:36 +0300)
committer
Ivailo Monev
<xakepa10@gmail.com>
Wed, 4 Aug 2021 19:36:01 +0000
(22:36 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/image/qxpmhandler.cpp
patch
|
blob
|
history
diff --git
a/src/gui/image/qxpmhandler.cpp
b/src/gui/image/qxpmhandler.cpp
index
823fa67
..
412686c
100644
(file)
--- a/
src/gui/image/qxpmhandler.cpp
+++ b/
src/gui/image/qxpmhandler.cpp
@@
-755,10
+755,6
@@
static bool read_xpm_string(QByteArray &buf, QIODevice *d, const char * const *s
qint64 bytesRead = d->read(readbuf, sizeof(readbuf));
if (bytesRead <= 0)
return false;
- if (Q_UNLIKELY(bytesRead > QBYTEARRAY_MAX)) {
- qWarning("QImage: XPM string data overflow");
- return false;
- }
state = QByteArray(readbuf, int(bytesRead));
offset = 0;
}