diff --git a/pkgs/development/libraries/json-c/default.nix b/pkgs/development/libraries/json-c/default.nix index 81ebc7baeb06..a3ddfe4c63c5 100644 --- a/pkgs/development/libraries/json-c/default.nix +++ b/pkgs/development/libraries/json-c/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, autoconf }: +{ stdenv, fetchurl, fetchpatch, autoconf }: stdenv.mkDerivation rec { name = "json-c-0.13.1"; @@ -7,6 +7,15 @@ stdenv.mkDerivation rec { sha256 = "0ch1v18wk703bpbyzj7h1mkwvsw4rw4qdwvgykscypvqq10678ll"; }; + patches = [ + # https://nvd.nist.gov/vuln/detail/CVE-2020-12762 + (fetchpatch { + name = "CVE-2020-12762.patch"; + url = "https://github.com/json-c/json-c/commit/865b5a65199973bb63dff8e47a2f57e04fec9736.patch"; + sha256 = "1g5afk4khhm1sb70xrva1pyznshcw3ipzp1g5z60dpzxy303pp6h"; + }) + ]; + outputs = [ "out" "dev" ]; nativeBuildInputs = [ autoconf ]; # for autoheader