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 lass='sub right'>
aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/python-crypto.scm
AgeCommit message (Expand)Author
2024-04-07gnu: python-certifi: Use system SSL certificates....* gnu/packages/python-crypto.scm (python-certifi)[replacement]: New field. (python-certifi/fixed): Provide a python-certifi which only offers to use the system's SSL certificates. Change-Id: Ie1871be42988dff3cccfe24bca626149fee0f371 Efraim Flashner
2024-03-28gnu: python-pynacl: Use pyproject-build-system....* gnu/packages/python-crypto.scm (python-pynacl)[build-system]: Use pyproject-build-system. [arguments]: Remove custom check phase. [source]: Remove unnecessary substitution. Change-Id: Idf2409022abde9f3a59e71cd1fa69ce9f1df6b1f Ricardo Wurmus
2024-03-28gnu: python-pynacl: Update to 1.5.0....* gnu/packages/python-crypto.scm (python-pynacl): Update to 1.5.0. Change-Id: Iadf81b8d67a5d4fa08fbcb9937afa86de33385dc Signed-off-by: Ricardo Wurmus <rekado@elephly.net> nafkhamdc
2024-02-20gnu: rust-asn1: Move to (gnu packages crates-tls)....* gnu/packages/crates-io.scm (rust-asn1-0.15, rust-asn1-0.13, rust-asn1-derive-0.15, rust-asn1-derive-0.13, rust-asn1-rs-0.5, rust-asn1-rs-0.3, rust-asn1-rs-derive-0.4, rust-asn1-rs-derive-0.1, rust-asn1-rs-impl-0.1): Move from here ... * gnu/packages/crates-tls.scm: ... to here. Change-Id: I1293490ef4afe2a9609337e996bc8f2b0eb0e3e6 Efraim Flashner