Commit 4860fbe7 authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

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

parent 5851ba86
...@@ -401,7 +401,7 @@ static void check_supported_protocols( ...@@ -401,7 +401,7 @@ static void check_supported_protocols(
for(i = 0; i < num_flags; i++) 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); err = pgnutls_priority_set_direct(session, priority, NULL);
if (err == GNUTLS_E_SUCCESS) if (err == GNUTLS_E_SUCCESS)
{ {
...@@ -1022,7 +1022,7 @@ static NTSTATUS schan_get_cipher_info( void *args ) ...@@ -1022,7 +1022,7 @@ static NTSTATUS schan_get_cipher_info( void *args )
wcscat( info->szCipherSuite, widthW ); wcscat( info->szCipherSuite, widthW );
wcscat( info->szCipherSuite, info->szCipher ); wcscat( info->szCipherSuite, info->szCipher );
wcscat( info->szCipherSuite, underscoreW ); 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 ); ptr = info->szCipherSuite + wcslen( info->szCipherSuite );
ntdll_umbstowcs( buf, len, ptr, len ); ntdll_umbstowcs( buf, len, ptr, len );
wcscat( info->szCipherSuite, underscoreW ); wcscat( info->szCipherSuite, underscoreW );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment