mountmgr: Replace sprintf with snprintf to avoid deprecation warnings on macOS.
This commit is contained in:
parent
81111326ff
commit
a5b8e68422
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ static void detect_devices( const char **paths, char *names, ULONG size )
|
|||
|
||||
for (;;)
|
||||
{
|
||||
int len = sprintf( unix_path, *paths, i++ );
|
||||
int len = snprintf( unix_path, sizeof(unix_path), *paths, i++ );
|
||||
if (len + 2 > size) break;
|
||||
if (access( unix_path, F_OK ) != 0) break;
|
||||
strcpy( names, unix_path );
|
||||
|
|
Loading…
Add table
Reference in a new issue