summaryrefslogtreecommitdiff
path: root/libdecor/build
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 /libdecor/build
parent53d9614adbb728fc4db983c9bb817c6eea870994 (diff)
Replace all calls to sprintf() by calls to snprintf().
Diffstat (limited to 'libdecor/build')
-rw-r--r--libdecor/build/fl_libdecor-plugins.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdecor/build/fl_libdecor-plugins.c b/libdecor/build/fl_libdecor-plugins.c
index 0f641363f..840f0771d 100644
--- a/libdecor/build/fl_libdecor-plugins.c
+++ b/libdecor/build/fl_libdecor-plugins.c
@@ -312,10 +312,10 @@ static const char *get_libdecor_plugin_description(struct libdecor_frame *frame)
char fname[PATH_MAX];
const char *dir = getenv("LIBDECOR_PLUGIN_DIR");
if (!dir) dir = LIBDECOR_PLUGIN_DIR;
- sprintf(fname, "%s/libdecor-gtk.so", dir);
+ snprintf(fname, PATH_MAX, "%s/libdecor-gtk.so", dir);
void *dl = dlopen(fname, RTLD_LAZY | RTLD_LOCAL);
if (!dl) {
- sprintf(fname, "%s/libdecor-cairo.so", dir);
+ snprintf(fname, PATH_MAX, "%s/libdecor-cairo.so", dir);
dl = dlopen(fname, RTLD_LAZY | RTLD_LOCAL);
}
if (dl) plugin_description = (const struct libdecor_plugin_description*)dlsym(dl, "libdecor_plugin_description");