secur32: Replace sprintf with snprintf to avoid deprecation warnings on macOS.

This commit is contained in:
Brendan Shanks 2024-03-11 13:50:17 -07:00 committed by Alexandre Julliard
parent 5851ba8686
commit 4860fbe7b5

View file

@ -401,7 +401,7 @@ static void check_supported_protocols(
for(i = 0; i < num_flags; i++)
{
sprintf(priority, "NORMAL:-%s", flags[i].gnutls_flag);
snprintf(priority, sizeof(priority), "NORMAL:-%s", flags[i].gnutls_flag);
err = pgnutls_priority_set_direct(session, priority, NULL);
if (err == GNUTLS_E_SUCCESS)
{
@ -1022,7 +1022,7 @@ static NTSTATUS schan_get_cipher_info( void *args )
wcscat( info->szCipherSuite, widthW );
wcscat( info->szCipherSuite, info->szCipher );
wcscat( info->szCipherSuite, underscoreW );
len = sprintf( buf, "%u", (unsigned int)info->dwCipherLen ) + 1;
len = snprintf( buf, sizeof(buf), "%u", (unsigned int)info->dwCipherLen ) + 1;
ptr = info->szCipherSuite + wcslen( info->szCipherSuite );
ntdll_umbstowcs( buf, len, ptr, len );
wcscat( info->szCipherSuite, underscoreW );