mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
main/less: upgrade to 661
This commit is contained in:
parent
45d134f2d6
commit
2988f46430
@ -1,8 +1,8 @@
|
|||||||
# Contributor: Cameron Banta <cbanta@gmail.com>
|
# Contributor: Cameron Banta <cbanta@gmail.com>
|
||||||
# Maintainer: Celeste <cielesti@protonmail.com>
|
# Maintainer: Celeste <cielesti@protonmail.com>
|
||||||
pkgname=less
|
pkgname=less
|
||||||
pkgver=643
|
pkgver=661
|
||||||
pkgrel=2
|
pkgrel=0
|
||||||
pkgdesc="File pager"
|
pkgdesc="File pager"
|
||||||
url="https://www.greenwoodsoftware.com/less/"
|
url="https://www.greenwoodsoftware.com/less/"
|
||||||
arch="all"
|
arch="all"
|
||||||
@ -10,9 +10,7 @@ license="GPL-3.0-or-later OR BSD-2-Clause"
|
|||||||
options="!check"
|
options="!check"
|
||||||
makedepends="ncurses-dev"
|
makedepends="ncurses-dev"
|
||||||
subpackages="$pkgname-doc"
|
subpackages="$pkgname-doc"
|
||||||
source="https://www.greenwoodsoftware.com/less/less-$pkgver.tar.gz
|
source="https://www.greenwoodsoftware.com/less/less-$pkgver.tar.gz"
|
||||||
CVE-2024-32487.patch
|
|
||||||
"
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
./configure \
|
./configure \
|
||||||
@ -30,6 +28,5 @@ package() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
6a324ac54e22429ac652dc303bc1fe48933555d1cbf8ad7ecf345940910c014fef9551a3219743cfb7115e356b5841ae97d6ce62e7a1ba1e3300d243efca34d9 less-643.tar.gz
|
49d81ff9e79d43ce0271490e3bffd590b4aed5fcb387bc8eb3128de99e5b5a5ede2e2818b546f6e3a140fa6261f1de3dfba1231f7ff7ef18502bb7030eaea1b5 less-661.tar.gz
|
||||||
a7d32e8f969a19f23b6ce4b53e6c58f2920e95ac76ce2a4a1b97e5d545e3556c2f9edf804a8475748f477f97aaa3faa290d393995c863e99090a09fda3d82a56 CVE-2024-32487.patch
|
|
||||||
"
|
"
|
||||||
|
@ -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';
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user