Skip to content

Commit bd8ce35

Browse files
committed
Removed deprecated sprintf call
1 parent f65a336 commit bd8ce35

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/test/utest/io/dir.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2020 Vladimir Sadovnikov <[email protected]>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <[email protected]>
44
*
55
* This file is part of lsp-runtime-lib
66
* Created on: 18 мар. 2019 г.
@@ -141,16 +141,16 @@ UTEST_BEGIN("runtime.io", dir)
141141
char path[PATH_MAX];
142142
char c = FILE_SEPARATOR_C;
143143

144-
::sprintf(path, "%s" "%c" "io" "%c" "iconv",
144+
::snprintf(path, sizeof(path), "%s" "%c" "io" "%c" "iconv",
145145
resources(), c, c);
146146

147147
testReadDir(path, false);
148148
testReadDir(path, true);
149149

150-
::sprintf(path, "some" "%c" "long" "%c" "path", c, c);
150+
::snprintf(path, sizeof(path), "some" "%c" "long" "%c" "path", c, c);
151151
testCreateDir(path, true);
152152

153-
::sprintf(path, "another" "%c" "long" "%c" "path", c, c);
153+
::snprintf(path, sizeof(path), "another" "%c" "long" "%c" "path", c, c);
154154
testCreateDir(path, false);
155155
}
156156

0 commit comments

Comments
 (0)