diff --git a/community/growlight/APKBUILD b/community/growlight/APKBUILD index d25329eef6f..1cbee2f599b 100644 --- a/community/growlight/APKBUILD +++ b/community/growlight/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Nick Black pkgname=growlight pkgver=1.2.38 -pkgrel=2 +pkgrel=3 pkgdesc="Block device manager" url="https://nick-black.com/dankwiki/index.php/Growlight" arch="all" @@ -40,5 +40,5 @@ package() { sha512sums=" 93e47dee8fc95fd59f196e7f4330d1b97acc5699f830aa604fbee9f08777a23dfa26a98dc3711c3c1bb7e4ccb636e06b6c04b45d9083db016bd8f2bee10e5fd4 growlight-1.2.38.tar.gz -c2481b93210e1d90b3653b6446f8d2b7fac1511d77bbe6e44fb89a78e2eb03d67851434ba3b22765dc4dc5b95b813700a06a6b9851c2d14e8e16d91e88db0a96 gcc14.patch +0a17f7cd4030f48d9cfa2e62c9486df72d67f755de45b955fbed243dd2d01be9aa6dec464944b159f19d18a973e859ac9a01f78ca89036f11ad02cb22987fc7e gcc14.patch " diff --git a/community/growlight/gcc14.patch b/community/growlight/gcc14.patch index ae069378a13..a6372a09fbb 100644 --- a/community/growlight/gcc14.patch +++ b/community/growlight/gcc14.patch @@ -1,12 +1,48 @@ +Patch-Source: https://github.com/dankamongmen/growlight/commit/aa4b53cf6ecdd52dfa425a5a6165f9bc66efdd0f +-- +From aa4b53cf6ecdd52dfa425a5a6165f9bc66efdd0f Mon Sep 17 00:00:00 2001 +From: nick black +Date: Fri, 30 Aug 2024 03:23:31 -0400 +Subject: [PATCH] drop all uses of basename(2) + +the POSIX variant of basename(2) can freely write +to the string it is passed. in all call sites, we +were passing a const char* ultimately sourced +from argv[0], to which we must not write. the GNU +variant doesn't have this behavior, but we can't +assume that variant on e.g. musl. + +so just drop the basename() calls entirely. they +didn't add much, and arguably lost information. + +thanks to znley and celeste of alpine for bringing +this to my attention in + +https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/71142 + + alpine linux: always kicking ass +--- + src/growlight.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + diff --git a/src/growlight.c b/src/growlight.c -index 283e6a2..44648d8 100644 +index 283e6a2..9ebc901 100644 --- a/src/growlight.c +++ b/src/growlight.c -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - #include +@@ -1501,14 +1501,14 @@ watch_dir(int fd, const char *dfp, eventfxn fxn, int *wd, int timeout){ - #include "fs.h" + static void + version(const char *name){ +- diag("%s version %s\n", basename(name), VERSION); ++ diag("%s version %s\n", name, VERSION); + } + + static void + usage(const char *name, int disphelp){ + diag("usage: %s [ -h|--help ] [ -v|--verbose ] [ -V|--version ]\n" + "\t[ -t|--target=path ] [ --notroot ] [ -i|--import ]%s\n", +- basename(name), disphelp ? " [ --disphelp ]" : ""); ++ name, disphelp ? " [ --disphelp ]" : ""); + } + + static int