From 2b803c94ed0cd126af13b752ddc038e320565dbd Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 17 Dec 2024 12:18:09 +0100 Subject: Fix bad restore point handling in RSA-AES handler A set restore point needs to be used or cleared. Release builds will let this slide, but debug builds will kill the connection. --- common/rfb/SSecurityRSAAES.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/rfb/SSecurityRSAAES.cxx') diff --git a/common/rfb/SSecurityRSAAES.cxx b/common/rfb/SSecurityRSAAES.cxx index 46b66ca9..39b286de 100644 --- a/common/rfb/SSecurityRSAAES.cxx +++ b/common/rfb/SSecurityRSAAES.cxx @@ -540,9 +540,9 @@ void SSecurityRSAAES::writeSubtype() bool SSecurityRSAAES::readCredentials() { - rais->setRestorePoint(); if (!rais->hasData(1)) return false; + rais->setRestorePoint(); uint8_t lenUsername = rais->readU8(); if (!rais->hasDataOrRestore(lenUsername + 1)) return false; -- cgit v1.2.3