From a56a50361bc5cd9b3157bc2e5f7dfdca83cf4570 Mon Sep 17 00:00:00 2001 From: Richard Markiewicz Date: Thu, 4 Dec 2025 11:14:05 -0500 Subject: [PATCH] [smartcardlogon] Fix off-by-one error in smartcard_hw_enumerateCerts --- libfreerdp/core/smartcardlogon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libfreerdp/core/smartcardlogon.c b/libfreerdp/core/smartcardlogon.c index d4a057350..f2c6b9935 100644 --- a/libfreerdp/core/smartcardlogon.c +++ b/libfreerdp/core/smartcardlogon.c @@ -581,8 +581,8 @@ static BOOL smartcard_hw_enumerateCerts(const rdpSettings* settings, LPCWSTR csp if (!scopeStr) goto out; - (void)_snprintf(scopeStr, readerSz + 5, "\\\\.\\%s\\", reader); - scope = ConvertUtf8NToWCharAlloc(scopeStr, readerSz + 5, NULL); + (void)_snprintf(scopeStr, readerSz + 6, "\\\\.\\%s\\", reader); + scope = ConvertUtf8NToWCharAlloc(scopeStr, readerSz + 6, NULL); free(scopeStr); if (!scope)