Skip to content

Commit

Permalink
fontforge: add patch for CVE-2024-25081 & CVE-2024-25082
Browse files Browse the repository at this point in the history
  • Loading branch information
risicle committed Feb 28, 2024
1 parent 5d1b96e commit 3438e13
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkgs/tools/misc/fontforge/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, lib
{ stdenv, fetchFromGitHub, lib, fetchpatch
, cmake, uthash, pkg-config
, python, freetype, zlib, glib, giflib, libpng, libjpeg, libtiff, libxml2, cairo, pango
, readline, woff2, zeromq
Expand All @@ -23,6 +23,14 @@ stdenv.mkDerivation rec {
sha256 = "sha256-/RYhvL+Z4n4hJ8dmm+jbA1Ful23ni2DbCRZC5A3+pP0=";
};

patches = [
(fetchpatch {
name = "CVE-2024-25081.CVE-2024-25082.patch";
url = "https://github.com/fontforge/fontforge/commit/216eb14b558df344b206bf82e2bdaf03a1f2f429.patch";
hash = "sha256-aRnir09FSQMT50keoB7z6AyhWAVBxjSQsTRvBzeBuHU=";
})
];

# use $SOURCE_DATE_EPOCH instead of non-deterministic timestamps
postPatch = ''
find . -type f -name '*.c' -exec sed -r -i 's#\btime\(&(.+)\)#if (getenv("SOURCE_DATE_EPOCH")) \1=atol(getenv("SOURCE_DATE_EPOCH")); else &#g' {} \;
Expand Down

0 comments on commit 3438e13

Please sign in to comment.