Skip to content

Commit

Permalink
Merge pull request #303825 from LeSuisse/less-sec-issue-newline-paths
Browse files Browse the repository at this point in the history
less: apply patch for security issue when opening files with \n in paths
  • Loading branch information
fpletz authored Apr 15, 2024
2 parents 99d561f + 22bd2ab commit c10fcc9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/by-name/le/less/package.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, ncurses
, pcre2
}:
Expand All @@ -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
Expand Down

0 comments on commit c10fcc9

Please sign in to comment.