mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
pcre2: 10.22 -> 10.23 + security fix
CVE-2017-7186
refs nixos/security#57 #24319
(cherry picked from commit 955b79f462)
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl, fetchpatch }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "pcre2-10.21";
|
||||
name = "pcre2-${version}";
|
||||
version = "10.23";
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${name}.tar.bz2";
|
||||
sha256 = "1q6lrj9b08l1q39vxipb0fi88x6ybvkr6439h8bjb9r8jd81fsn6";
|
||||
sha256 = "0vn5g0mkkp99mmzpissa06hpyj6pk9s4mlwbjqrjvw3ihy8rpiyz";
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
@@ -13,8 +14,31 @@ stdenv.mkDerivation rec {
|
||||
"--enable-jit"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Perl Compatible Regular Expressions";
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "CVE-2017-7186-part1.patch";
|
||||
url = "https://vcs.pcre.org/pcre2/code/trunk/src/pcre2_ucd.c?view=patch&r1=316&r2=670&sortby=date";
|
||||
sha256 = "10yzglvbn7h06hg7zffr5zh378i5jihvx7d5gggkynws79vgwvfr";
|
||||
stripLen = 2;
|
||||
addPrefixes = true;
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "CVE-2017-7186-part2.patch";
|
||||
url = "https://vcs.pcre.org/pcre2/code/trunk/src/pcre2_internal.h?view=patch&r1=600&r2=670&sortby=date";
|
||||
sha256 = "1bggk7vd5hg0bjg96lj4h1lacmr6grq68dm6iz1n7vg3zf7virjn";
|
||||
stripLen = 2;
|
||||
addPrefixes = true;
|
||||
})
|
||||
];
|
||||
|
||||
outputs = [ "bin" "dev" "out" "doc" "man" "devdoc" ];
|
||||
|
||||
postFixup = ''
|
||||
moveToOutput bin/pcre2-config "$dev"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Perl Compatible Regular Expressions";
|
||||
homepage = "http://www.pcre.org/";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = [ stdenv.lib.maintainers.ttuegel ];
|
||||
|
||||
Reference in New Issue
Block a user