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:
118d7e2
)
use uninitialized buffer in QUtf8::convertFromUnicode()
author
Ivailo Monev
<xakepa10@laimg.moc>
Thu, 25 Jul 2019 11:18:45 +0000
(11:18 +0000)
committer
Ivailo Monev
<xakepa10@laimg.moc>
Thu, 25 Jul 2019 11:18:45 +0000
(11:18 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/core/codecs/qutfcodec.cpp
patch
|
blob
|
history
diff --git
a/src/core/codecs/qutfcodec.cpp
b/src/core/codecs/qutfcodec.cpp
index
4c15846
..
81391e6
100644
(file)
--- a/
src/core/codecs/qutfcodec.cpp
+++ b/
src/core/codecs/qutfcodec.cpp
@@
-66,8
+66,7
@@
QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len, QTextCodec::Conve
surrogate_high = state->state_data[0];
}
- QByteArray rstr;
- rstr.resize(rlen);
+ QByteArray rstr(rlen, Qt::Uninitialized);
uchar* cursor = (uchar*)rstr.data();
const QChar *ch = uc;
int invalid = 0;