Brendan Shanks : mountmgr: Replace sprintf with snprintf to avoid deprecation warnings on macOS.
Module: wine Branch: master Commit: a5b8e684226a5d80f57382b40fd6d1bb64a2ff6c URL: https://gitlab.winehq.org/wine/wine/-/commit/a5b8e684226a5d80f57382b40fd6d1b... Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Mon Mar 11 11:55:24 2024 -0700 mountmgr: Replace sprintf with snprintf to avoid deprecation warnings on macOS. --- dlls/mountmgr.sys/unixlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/mountmgr.sys/unixlib.c b/dlls/mountmgr.sys/unixlib.c index b74b2336a34..9d7cd904769 100644 --- a/dlls/mountmgr.sys/unixlib.c +++ b/dlls/mountmgr.sys/unixlib.c @@ -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 );
participants (1)
-
Alexandre Julliard