less: apply patch for security issue when opening files with \n in paths

https://www.openwall.com/lists/oss-security/2024/04/12/5
This commit is contained in:
Thomas Gerbet 2024-04-13 14:22:06 +02:00
parent 14b13525fc
commit 22bd2ab624

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, ncurses
, pcre2
}:
@ -16,6 +17,15 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-KRG1QyyDb6CEyKLmj2zWMSNywCalj6qpiGJzHItgUug=";
};
patches = [
(fetchpatch {
# https://www.openwall.com/lists/oss-security/2024/04/12/5
name = "sec-issue-newline-path.patch";
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/less/-/raw/1d570db0c84fe95799f460526492e45e24c30ad0/backport-007521ac3c95bc76.patch";
hash = "sha256-BT8DLIu7oVhL5XL50uFVUp97qjklcvRHy85UQwVKAmc=";
})
];
buildInputs = [
ncurses
pcre2