From 2c2cb5d49700807696abf003d7d544045a01ddc8 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Thu, 20 Oct 2022 23:32:37 +0100 Subject: [PATCH] shapelib: add patch for CVE-2022-0699 --- pkgs/development/libraries/shapelib/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/shapelib/default.nix b/pkgs/development/libraries/shapelib/default.nix index 1604578a10c9..c9793d5440b3 100644 --- a/pkgs/development/libraries/shapelib/default.nix +++ b/pkgs/development/libraries/shapelib/default.nix @@ -1,4 +1,8 @@ -{ lib, stdenv, fetchurl }: +{ lib +, stdenv +, fetchurl +, fetchpatch +}: stdenv.mkDerivation rec { pname = "shapelib"; @@ -9,6 +13,14 @@ stdenv.mkDerivation rec { sha256 = "1qfsgb8b3yiqwvr6h9m81g6k9fjhfys70c22p7kzkbick20a9h0z"; }; + patches = [ + (fetchpatch { + name = "CVE-2022-0699.patch"; + url = "https://github.com/OSGeo/shapelib/commit/c75b9281a5b9452d92e1682bdfe6019a13ed819f.patch"; + sha256 = "sha256-zJ7JHUtInA5q/RbkSs1DqVK+UQi2vIw2t1jqxocnQQI="; + }) + ]; + meta = with lib; { description = "C Library for reading, writing and updating ESRI Shapefiles"; homepage = "http://shapelib.maptools.org/";