cpio: add patch for CVE-2021-38185

This commit is contained in:
Robert Scott 2021-08-22 17:37:13 +01:00
parent 42f8c46335
commit b2c07a1a29

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl }:
{ lib, stdenv, fetchurl, fetchpatch }:
let
version = "2.13";
@ -11,6 +11,14 @@ in stdenv.mkDerivation {
sha256 = "0vbgnhkawdllgnkdn6zn1f56fczwk0518krakz2qbwhxmv2vvdga";
};
patches = [
(fetchpatch {
name = "CVE-2021-38185.patch";
url = "https://git.savannah.gnu.org/cgit/cpio.git/patch/?id=dd96882877721703e19272fe25034560b794061b";
sha256 = "0vmr0qjwj2ldnzsvccl105ckwgx3ssvn9mp3f27ss0kiyigrzz32";
})
];
preConfigure = if stdenv.isCygwin then ''
sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,'
'' else null;