diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-06-21 09:59:41 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2010-06-21 10:04:09 (GMT) |
commit | 57fcc060fdce0874309ec94bb7ab77b44554e91b (patch) | |
tree | 1bfdd3e3e71e54c19d74b25c8c24637500d66c2f /src/plugins/gfxdrivers | |
parent | 7ed3e0085331e911b231d26c58a4e09e0e7aeffb (diff) | |
download | Qt-57fcc060fdce0874309ec94bb7ab77b44554e91b.zip Qt-57fcc060fdce0874309ec94bb7ab77b44554e91b.tar.gz Qt-57fcc060fdce0874309ec94bb7ab77b44554e91b.tar.bz2 |
Fix crash at exit and out of bounds write
Task-number: QTBUG-11542, QTBUG-11196
Reviewed-by: Jørgen
Diffstat (limited to 'src/plugins/gfxdrivers')
-rw-r--r-- | src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp index f5ad70c..e0a365b 100644 --- a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp +++ b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp @@ -1481,7 +1481,7 @@ void QVNCServer::convertPixels(char *dst, const char *src, int count) const } if (count & 0x1) { const quint16 *src16 = reinterpret_cast<const quint16*>(src); - dst32[count - 1] = qt_conv16ToRgb(src16[count - 1]); + *dst32 = qt_conv16ToRgb(src16[count - 1]); } return; #endif @@ -2038,7 +2038,7 @@ void QVNCServer::discardClient() delete qvnc_cursor; qvnc_cursor = 0; #endif - if (!qvnc_screen->screen() && !qvnc_screen->d_ptr->noDisablePainting) + if (!qvnc_screen->screen() && !qvnc_screen->d_ptr->noDisablePainting && QWSServer::instance()) QWSServer::instance()->enablePainting(false); } |