From 3121eeb5e68bedd6e2398f35b9bd60b69709a47e Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Tue, 14 Dec 2021 18:49:54 +0100 Subject: [PATCH] Replace hardcoded command length --- src/screenshot/screenshot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/screenshot/screenshot.c b/src/screenshot/screenshot.c index 9df0ea7..5f27681 100644 --- a/src/screenshot/screenshot.c +++ b/src/screenshot/screenshot.c @@ -42,8 +42,9 @@ static bool exec_screenshooter_interactive(const char *path) { perror("fork"); return false; } else if (pid == 0) { - char cmd[strlen(path) + 25]; - snprintf(cmd, sizeof(cmd), "grim -g \"$(slurp)\" -- %s", path); + const char cmd_fmt[] = "grim -g \"$(slurp)\" -- %s"; + char cmd[strlen(path) + sizeof(cmd_fmt)]; + snprintf(cmd, sizeof(cmd), cmd_fmt, path); execl("/bin/sh", "/bin/sh", "-c", cmd, NULL); perror("execl"); exit(127); -- 2.34.0 ss='sub right'>
aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/pretty-print.scm
AgeCommit message (Expand)Author
2023-09-07gnu: fmt-10: Update to 10.1.1....* gnu/packages/pretty-print.scm (fmt-10): Update to 10.1.1. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Greg Hogan
2023-09-05gnu: highlight: Update to 4.8....* gnu/packages/pretty-print.scm (highlight): Update to 4.8. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> gemmaro
2023-08-15gnu: highlight: Fix paths for Perl bindings....* gnu/packages/pretty-print.scm (highlight): Fix paths for Perl bindings. [arguments]<phases>: Set hl_data_dir and hl_conf_dir in install-perl-bindings phase. Signed-off-by: Ludovic Courtès <ludo@gnu.org> gemmaro
2023-08-15gnu: highlight: Add "gui" output....* gnu/packages/pretty-print.scm (highlight): Add gui output. [source]: Add patch for GUI data directory. [outputs]: Add gui. [arguments]<phases>{fix-search-for-lua}: Fix Lua package name for GUI. {build-gui}: Add phase to build GUI. {install}: Set PREFIX variable. {install-gui}: Add phase to install GUI. [inputs]: Add qtbase-5. * gnu/packages/patches/highlight-gui-data-dir.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès <ludo@gnu.org> gemmaro
2023-08-15gnu: highlight: Use new package style....* gnu/packages/pretty-print.scm (highlight) Use new package style. [arguments]: Use G-expression. Drop trailing #t from phases. [source, inputs, native-inputs, description]: Reformat with guix style. Signed-off-by: Ludovic Courtès <ludo@gnu.org> gemmaro
2023-08-15gnu: highlight: Update to 4.7....* gnu/packages/pretty-print.scm (highlight): Update to 4.7. Signed-off-by: Ludovic Courtès <ludo@gnu.org> gemmaro