From 2ffd4e4f1af16b17a286ff354603a717f5d828a5 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 26 Sep 2022 16:12:18 +0200 Subject: Replace all calls to sprintf() by calls to snprintf(). --- libdecor/build/fl_libdecor-plugins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libdecor') 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"); -- cgit v1.2.3