Unverified Commit 41ba20eb authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

Merge pull request #284491 from LeSuisse/libredwg-CVE-2023-26157

libredwg: apply patch for CVE-2023-26157
parents c3579505 926673e7
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, autoreconfHook
, writeShellScript
, pkg-config
@@ -27,6 +28,14 @@ stdenv.mkDerivation rec {
    fetchSubmodules = true;
  };

  patches = [
    (fetchpatch {
      name = "CVE-2023-26157.patch";
      url = "https://github.com/LibreDWG/libredwg/commit/c8cf03ce4c2315b146caf582ea061c0460193bcc.patch";
      hash = "sha256-EEF3YYPW+6SvXRiAw3zz6tWU9w/qmGtc09Tf8wn7hVc=";
    })
  ];

  postPatch = let
    printVersion = writeShellScript "print-version" ''
      echo -n ${lib.escapeShellArg version}