[PATCH v2 0/1] MR4160: makedep: Replace sprintf with snprintf to avoid a deprecation warning.
-- v2: makedep: Replace sprintf with snprintf to avoid a deprecation warning on macOS. https://gitlab.winehq.org/wine/wine/-/merge_requests/4160
From: Brendan Shanks <bshanks(a)codeweavers.com> --- tools/makedep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/makedep.c b/tools/makedep.c index 8495d93d8c6..e35de8a00f3 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -3898,7 +3898,7 @@ static FILE *create_temp_file( const char *orig ) for (i = 0; i < 100; i++) { - sprintf( name, "%s.tmp%08x", orig, id ); + snprintf( name, strlen(orig) + 13, "%s.tmp%08x", orig, id ); if ((fd = open( name, O_RDWR | O_CREAT | O_EXCL, 0666 )) != -1) { ret = fdopen( fd, "w" ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4160
participants (2)
-
Brendan Shanks -
Brendan Shanks (@bshanks)