jbigkit: add patch to fix security issue CVE-2017-9937

(cherry picked from commit 820eb4f3a6)
This commit is contained in:
Pol Dellaiera
2024-10-01 09:19:35 +02:00
committed by github-actions[bot]
parent df27247e6f
commit d6c14ea8f6

View File

@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl }:
{ lib, stdenv, fetchurl, fetchpatch }:
stdenv.mkDerivation rec {
pname = "jbigkit";
@@ -9,6 +9,14 @@ stdenv.mkDerivation rec {
sha256 = "0cnrcdr1dwp7h7m0a56qw09bv08krb37mpf7cml5sjdgpyv0cwfy";
};
patches = [
# Archlinux patch: this helps users to reduce denial-of-service risks, as in CVE-2017-9937
(fetchpatch {
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/jbigkit/-/raw/main/0013-new-jbig.c-limit-s-maxmem-maximum-decoded-image-size.patch";
hash = "sha256-Yq5qCTF7KZTrm4oeWbpctb+QLt3shJUGEReZvd0ey9k=";
})
];
makeFlags = [
"CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"
"AR=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar"