summaryrefslogtreecommitdiff
path: root/test/list_visuals.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-26 16:12:18 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-26 16:12:18 +0200
commit2ffd4e4f1af16b17a286ff354603a717f5d828a5 (patch)
tree99e2d4a7e2fde8e3abb027eb687901440750ee00 /test/list_visuals.cxx
parent53d9614adbb728fc4db983c9bb817c6eea870994 (diff)
Replace all calls to sprintf() by calls to snprintf().
Diffstat (limited to 'test/list_visuals.cxx')
-rw-r--r--test/list_visuals.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/list_visuals.cxx b/test/list_visuals.cxx
index 18b98045f..1d57f5e93 100644
--- a/test/list_visuals.cxx
+++ b/test/list_visuals.cxx
@@ -92,7 +92,7 @@ static void print_mask(XVisualInfo* p) {
else new_what = '?';
if (new_what != what) {
if (what && (what != '?' || print_anything)) {
- q += sprintf(q,"%d%c", n, what);
+ q += snprintf(q, sizeof(buf) - (q-buf), "%d%c", n, what);
print_anything = 1;
}
what = new_what;