From 388f5e08a40ad4fda911b9db2df6a1f4ded3ac2a Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 28 Dec 2018 13:43:18 +0100 Subject: [PATCH] mupdf: fix CVE-2018-18662 --- pkgs/applications/misc/mupdf/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/mupdf/default.nix b/pkgs/applications/misc/mupdf/default.nix index d4f59272c9c..c91b9f6fb06 100644 --- a/pkgs/applications/misc/mupdf/default.nix +++ b/pkgs/applications/misc/mupdf/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, pkgconfig, freetype, harfbuzz, openjpeg +{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, freetype, harfbuzz, openjpeg , jbig2dec, libjpeg , darwin , enableX11 ? true, libX11, libXext, libXi, libXrandr , enableCurl ? true, curl, openssl @@ -24,7 +24,14 @@ in stdenv.mkDerivation rec { patches = # Use shared libraries to decrease size - stdenv.lib.optional (!stdenv.isDarwin) ./mupdf-1.14-shared_libs.patch + [( fetchpatch + { + name = "CVE-2018-18662"; + url = "http://git.ghostscript.com/?p=mupdf.git;a=patch;h=164ddc22ee0d5b63a81d5148f44c37dd132a9356"; + sha256 = "1jkzh20n3b854871h86cy5y7fvy0d5wyqy51b3fg6gj3a0jqpzzd"; + } + )] + ++ stdenv.lib.optional (!stdenv.isDarwin) ./mupdf-1.14-shared_libs.patch ++ stdenv.lib.optional stdenv.isDarwin ./darwin.patch ;