Merge pull request #12042 from Devolutions/bug/smartcard_hw_enumerateCerts_off_by_one

[smartcardlogon] Fix off-by-one error in `smartcard_hw_enumerateCerts`
This commit is contained in:
David Fort
2025-12-04 17:58:07 +01:00
committed by GitHub

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)