aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits/qt33
diff options
context:
space:
mode:
authorlofi <lofi@FreeBSD.org>2007-09-18 16:19:55 +0800
committerlofi <lofi@FreeBSD.org>2007-09-18 16:19:55 +0800
commit4cb3fa6d1d999248e2d83f63bf2026cc977865b9 (patch)
tree010ad6da392b30c4c0c51765260df71a0f615586 /x11-toolkits/qt33
parent4a826d139e6cd1fb8ac40f14c23e8f4bdaf52d78 (diff)
downloadfreebsd-ports-gnome-4cb3fa6d1d999248e2d83f63bf2026cc977865b9.tar.gz
freebsd-ports-gnome-4cb3fa6d1d999248e2d83f63bf2026cc977865b9.tar.zst
freebsd-ports-gnome-4cb3fa6d1d999248e2d83f63bf2026cc977865b9.zip
Fix potential vulnerability from an off-by-one error in the QUtf8Decoder
class. Security: CVS-2007-4137
Diffstat (limited to 'x11-toolkits/qt33')
-rw-r--r--x11-toolkits/qt33/files/patch-utf8-bug-qt38
1 files changed, 6 insertions, 2 deletions
diff --git a/x11-toolkits/qt33/files/patch-utf8-bug-qt3 b/x11-toolkits/qt33/files/patch-utf8-bug-qt3
index 43e84a99f1e9..3657e8e92236 100644
--- a/x11-toolkits/qt33/files/patch-utf8-bug-qt3
+++ b/x11-toolkits/qt33/files/patch-utf8-bug-qt3
@@ -8,8 +8,12 @@
int need;
bool headerDone;
public:
-@@ -167,8 +168,9 @@
- result.setLength( len ); // worst case
+@@ -164,11 +165,12 @@
+ 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;