summary refs log tree commit diff
path: root/pkgs/development/libraries/fcgi
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2016-09-24 07:21:15 -0400
committerGraham Christensen <graham@grahamc.com>2016-09-24 07:21:15 -0400
commitda6b9f47e9090a2e5d6e5eb0372c47f1ad2ad24e (patch)
treea5850992bd09c1922a46c4bfe92bb2fa2ca964fa /pkgs/development/libraries/fcgi
parenta63ca1bf3de482e6cb0cf0e3ce55ececc608b04b (diff)
downloadnixpkgs-da6b9f47e9090a2e5d6e5eb0372c47f1ad2ad24e.tar
nixpkgs-da6b9f47e9090a2e5d6e5eb0372c47f1ad2ad24e.tar.gz
nixpkgs-da6b9f47e9090a2e5d6e5eb0372c47f1ad2ad24e.tar.bz2
nixpkgs-da6b9f47e9090a2e5d6e5eb0372c47f1ad2ad24e.tar.lz
nixpkgs-da6b9f47e9090a2e5d6e5eb0372c47f1ad2ad24e.tar.xz
nixpkgs-da6b9f47e9090a2e5d6e5eb0372c47f1ad2ad24e.tar.zst
nixpkgs-da6b9f47e9090a2e5d6e5eb0372c47f1ad2ad24e.zip
fcgi: Patch to protect against stack smashing
Diffstat (limited to 'pkgs/development/libraries/fcgi')
-rw-r--r--pkgs/development/libraries/fcgi/default.nix18
1 files changed, 14 insertions, 4 deletions
diff --git a/pkgs/development/libraries/fcgi/default.nix b/pkgs/development/libraries/fcgi/default.nix
index 6808ea52adf..63adb5afd1c 100644
--- a/pkgs/development/libraries/fcgi/default.nix
+++ b/pkgs/development/libraries/fcgi/default.nix
@@ -1,14 +1,24 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, fetchpatch }:
 
 stdenv.mkDerivation rec {
-  name = "fcgi-2.4.0";
+  name = "fcgi-${version}";
+  version = "2.4.0";
 
   src = fetchurl {
-    url = "http://www.fastcgi.com/dist/${name}.tar.gz";
+    url = "https://launchpad.net/debian/+archive/primary/+files/libfcgi_${version}.orig.tar.gz";
+    #    url = "http://www.fastcgi.com/dist/${name}.tar.gz";
     sha256 = "1f857wnl1d6jfrgfgfpz3zdaj8fch3vr13mnpcpvy8bang34bz36";
   };
 
-  patches = [ ./gcc-4.4.diff ];
+  patches = [
+    ./gcc-4.4.diff
+    (fetchpatch {
+      # Fix a stack-smashing bug:
+      # xhttps://bugs.debian.org/cgi-bin/bugreport.cgi?bug=681591
+      url = "https://bugs.launchpad.net/ubuntu/+source/libfcgi/+bug/933417/+attachment/2745025/+files/poll.patch";
+      sha256 = "0v3gw0smjvrxh1bv3zx9xp633gbv5dd5bcn3ipj6ckqjyv4i6i7m";
+    })
+  ];
 
   postInstall = "ln -s . $out/include/fastcgi";