summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qt_x11_p.h
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-10-06 08:31:37 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-10-06 10:12:45 (GMT)
commit4b81cb847647450f4bad8a0d9a278d43ebdfecc6 (patch)
tree7f474bb83885e422f5284da47e4f3237dd7feed5 /src/gui/kernel/qt_x11_p.h
parent62ee836fafe515c03b0be716585f8c2354e188f7 (diff)
downloadQt-4b81cb847647450f4bad8a0d9a278d43ebdfecc6.zip
Qt-4b81cb847647450f4bad8a0d9a278d43ebdfecc6.tar.gz
Qt-4b81cb847647450f4bad8a0d9a278d43ebdfecc6.tar.bz2
Fixed a buffer overrun when pasting large data from non-Qt apps
When we receive a COMPOUND_TEXT data and convert it to multi-byte, if the new length is less than the original buffer, we resize the buffer, but then we need to make sure we reset the buffer_offset variable, which is returned as a "size" of the buffer to a caller. The conversion to COMPOUND_TEXT format was totally wrong, we were using the wrong length of the input text, so the converted string was truncated. Task-number: QTBUG-8644 Reviewed-by: Bradley T. Hughes
Diffstat (limited to 'src/gui/kernel/qt_x11_p.h')
-rw-r--r--src/gui/kernel/qt_x11_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h
index 7383382..d62d9c3 100644
--- a/src/gui/kernel/qt_x11_p.h
+++ b/src/gui/kernel/qt_x11_p.h
@@ -350,7 +350,7 @@ struct QX11Data
// from qclipboard_x11.cpp
bool clipboardWaitForEvent(Window win, int type, XEvent *event, int timeout);
bool clipboardReadProperty(Window win, Atom property, bool deleteProperty,
- QByteArray *buffer, int *size, Atom *type, int *format, bool nullterm);
+ QByteArray *buffer, int *size, Atom *type, int *format);
QByteArray clipboardReadIncrementalProperty(Window win, Atom property, int nbytes, bool nullterm);
// from qdnd_x11.cpp