summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2010-06-21 11:56:58 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2010-06-21 11:56:58 (GMT)
commit71b840ef81a91605beecbb3cccfa0f85c3289e19 (patch)
tree0a02f1dba16b0ce069e0ec10553c6a1a73a9c440 /src/plugins
parent57fcc060fdce0874309ec94bb7ab77b44554e91b (diff)
downloadQt-71b840ef81a91605beecbb3cccfa0f85c3289e19.zip
Qt-71b840ef81a91605beecbb3cccfa0f85c3289e19.tar.gz
Qt-71b840ef81a91605beecbb3cccfa0f85c3289e19.tar.bz2
Fix crash with large ClientCutMessage
Don't try to read the text length more than once. Task-number: QTBUG-9977 Reviewed-by: Jørgen
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
index e0a365b..3bafd97 100644
--- a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
+++ b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
@@ -1053,7 +1053,7 @@ void QVNCServer::clientCutText()
{
QRfbClientCutText ev;
- if (ev.read(client)) {
+ if (cutTextPending == 0 && ev.read(client)) {
cutTextPending = ev.length;
if (!cutTextPending)
handleMsg = false;