From ec9b5c33bc8bfaa5fecd1ec6e7d81ff39c726391 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Tue, 5 Nov 2024 17:49:48 +0100 Subject: [PATCH] [core,rdstls] do silent password check In rdstls_parse_pdu_data_type do not use logging stream functions. This function might be called with incomplete data so avoid spamming the log. --- libfreerdp/core/rdstls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libfreerdp/core/rdstls.c b/libfreerdp/core/rdstls.c index d7fad612f..0564a6da6 100644 --- a/libfreerdp/core/rdstls.c +++ b/libfreerdp/core/rdstls.c @@ -972,8 +972,9 @@ static SSIZE_T rdstls_parse_pdu_data_type(wLog* log, UINT16 dataType, wStream* s return 0; Stream_Read_UINT16(s, passwordLength); - if (!Stream_SafeSeek(s, passwordLength)) + if (Stream_GetRemainingLength(s) < passwordLength) return 0; + Stream_Seek(s, passwordLength); } break; case RDSTLS_DATA_AUTORECONNECT_COOKIE: