[smartcardlogon] Fix off-by-one error in smartcard_hw_enumerateCerts

This commit is contained in:
Richard Markiewicz
2025-12-04 11:14:05 -05:00
parent 129565951f
commit a56a50361b

View File

@@ -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)