fixes #6767: message 'Invalid read of size' with vnc.