From 71b840ef81a91605beecbb3cccfa0f85c3289e19 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 21 Jun 2010 13:56:58 +0200 Subject: Fix crash with large ClientCutMessage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't try to read the text length more than once. Task-number: QTBUG-9977 Reviewed-by: Jørgen --- src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v0.12