qt/qt-3.3.6-bz#292941-CVE-2007-4137.patch

12 lines
338 B
Diff
Raw Normal View History

2007-09-17 15:08:59 +00:00
--- src/codecs/qutfcodec.cpp
+++ src/codecs/qutfcodec.cpp
@@ -165,7 +165,7 @@ public:
QString toUnicode(const char* chars, int len)
{
QString result;
- result.setLength( len ); // worst case
+ result.setLength( len + 1 ); // worst case
QChar *qch = (QChar *)result.unicode();
uchar ch;
int error = -1;