here you are; this is only needed for _FORTIFY_SOURCE=3
diff --git a/PKGBUILD b/PKGBUILD
index 76552c2..05e01be 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,9 +15,12 @@ license=(GPL-2.0-only)
depends=(gtk3 imlib2 startup-notification)
makedepends=(cmake git ninja setconf)
source=("git+${url}.git#tag=${pkgver}"
- fix_segfault.patch)
+ fix_segfault.patch
+ fix_overflow.patch
+ )
sha256sums=('60dcde15ac09508daffe59b9c35244fee771f66ee989193f37d81c823fc643da'
- 'b7cd2936bb807478bbb356b96879dedbbfc464ed2f930f426a0123e39884f78f')
+ 'b7cd2936bb807478bbb356b96879dedbbfc464ed2f930f426a0123e39884f78f'
+ '9226b30dcec17cf03ac0873d90e5df3619c7e44efc2b527f4cec0ada49ac41cc')
prepare() {
setconf "${pkgname}/get_version.sh" VERSION="${pkgver}"
@@ -25,6 +28,7 @@ prepare() {
# See https://gitlab.archlinux.org/archlinux/packaging/packages/tint2/-/issues/1
cd "${pkgname}"
patch -Np1 < "${srcdir}/fix_segfault.patch"
+ patch -Np1 < "${srcdir}/fix_overflow.patch"
}
build() {
$ cat fix_overflow.patch
--- a/src/launcher/apps-common.c
+++ b/src/launcher/apps-common.c
@@ -104,6 +104,10 @@
q--; // To balance the q++ in the for
} else if (*p == 'f' || *p == 'F') {
- snprintf(q, buf_size, "%c%c", '%', *p);
- q += 2;
+ if (q+2 >= exec2+buf_size ){
+ fprintf(stderr,"*** buffer overflow detected at %s:%04d ***\n", __FILE__, __LINE__);
+ abort();
+ }
+ *q++ = '%';
+ *q++ = *p;
buf_size -= 2;
q--; // To balance the q++ in the for