diff --git a/main/less/APKBUILD b/main/less/APKBUILD index 5dce792a566759d59d44d9339d5f956a84a6c7d5..76ca1d2d03d46c7f78779b0f6d78d48af8002aeb 100644 --- a/main/less/APKBUILD +++ b/main/less/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Cameron Banta <cbanta@gmail.com> # Maintainer: Celeste <cielesti@protonmail.com> pkgname=less -pkgver=643 -pkgrel=2 +pkgver=661 +pkgrel=0 pkgdesc="File pager" url="https://www.greenwoodsoftware.com/less/" arch="all" @@ -10,9 +10,7 @@ license="GPL-3.0-or-later OR BSD-2-Clause" options="!check" makedepends="ncurses-dev" subpackages="$pkgname-doc" -source="https://www.greenwoodsoftware.com/less/less-$pkgver.tar.gz - CVE-2024-32487.patch - " +source="https://www.greenwoodsoftware.com/less/less-$pkgver.tar.gz" build() { ./configure \ @@ -30,6 +28,5 @@ package() { } sha512sums=" -6a324ac54e22429ac652dc303bc1fe48933555d1cbf8ad7ecf345940910c014fef9551a3219743cfb7115e356b5841ae97d6ce62e7a1ba1e3300d243efca34d9 less-643.tar.gz -a7d32e8f969a19f23b6ce4b53e6c58f2920e95ac76ce2a4a1b97e5d545e3556c2f9edf804a8475748f477f97aaa3faa290d393995c863e99090a09fda3d82a56 CVE-2024-32487.patch +49d81ff9e79d43ce0271490e3bffd590b4aed5fcb387bc8eb3128de99e5b5a5ede2e2818b546f6e3a140fa6261f1de3dfba1231f7ff7ef18502bb7030eaea1b5 less-661.tar.gz " diff --git a/main/less/CVE-2024-32487.patch b/main/less/CVE-2024-32487.patch deleted file mode 100644 index b879d90309ac4d2c2ea0df8c4b4f93b676068c4c..0000000000000000000000000000000000000000 --- a/main/less/CVE-2024-32487.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 007521ac3c95bc76e3d59c6dbfe75d06c8075c33 Mon Sep 17 00:00:00 2001 -From: Mark Nudelman <markn@greenwoodsoftware.com> -Date: Thu, 11 Apr 2024 17:49:48 -0700 -Subject: [PATCH] Fix bug when viewing a file whose name contains a newline. - ---- - filename.c | 31 +++++++++++++++++++++++++------ - 1 file changed, 25 insertions(+), 6 deletions(-) - -diff --git a/filename.c b/filename.c -index f90e0e82..a52c6354 100644 ---- a/filename.c -+++ b/filename.c -@@ -133,6 +133,15 @@ static constant char * metachars(void) - return (strchr(metachars(), c) != NULL); - } - -+/* -+ * Must use quotes rather than escape char for this metachar? -+ */ -+static int must_quote(char c) -+{ -+ /* {{ Maybe the set of must_quote chars should be configurable? }} */ -+ return (c == '\n'); -+} -+ - /* - * Insert a backslash before each metacharacter in a string. - */ -@@ -164,6 +173,9 @@ public char * shell_quoten(constant char *s, size_t slen) - * doesn't support escape chars. Use quotes. - */ - use_quotes = 1; -+ } else if (must_quote(*p)) -+ { -+ len += 3; /* open quote + char + close quote */ - } else - { - /* -@@ -193,15 +205,22 @@ public char * shell_quoten(constant char *s, size_t slen) - { - while (*s != '\0') - { -- if (metachar(*s)) -+ if (!metachar(*s)) - { -- /* -- * Add the escape char. -- */ -+ *p++ = *s++; -+ } else if (must_quote(*s)) -+ { -+ /* Surround the char with quotes. */ -+ *p++ = openquote; -+ *p++ = *s++; -+ *p++ = closequote; -+ } else -+ { -+ /* Insert an escape char before the char. */ - strcpy(p, esc); - p += esclen; -+ *p++ = *s++; - } -- *p++ = *s++; - } - *p = '\0'; - }