git.iko.soy/typeable/nixpkgs
on master help sign in
jshon: fix null termination in read_stream.

This fixes a somewhat critical (security?) bug. We are trying to get it merged upstream but have had no response from the ordinary maintainer in over a week. (See <https://github.com/keenerd/jshon/issues/53>.) fixes #23727

commit5d6ea2d64e759e30c5864ca2950c0b5ad9070437 authorDaniel Brockman <daniel@brockman.se> dateFri 10 Mar 2017, 21:59 (10 years ago) parentb3c14bb
1 file changed+12−3
pkgs/development/tools/parsing/jshon/default.nix+12−3
pkgs/development/tools/parsing/jshon/default.nix+12−3
@@ -1,4 +1,4 @@
1−{ stdenv, lib, fetchFromGitHub, jansson }:
1+{ stdenv, lib, fetchFromGitHub, fetchpatch, jansson }:
22
33stdenv.mkDerivation rec {
44 name = "jshon-20140712";
@@ -12,14 +12,23 @@ stdenv.mkDerivation rec {
1212 repo = "jshon";
1313 };
1414
15+ patches = [
16+ # Fix null termination in read_stream.
17+ # https://github.com/keenerd/jshon/issues/53
18+ (fetchpatch {
19+ url = https://github.com/mbrock/jshon/commit/32288dd186573ceb58164f30be1782d4580466d8.patch;
20+ sha256 = "04rss2nprl9nqblc7smq0477n54hm801xgnnmvyzni313i1n6vhl";
21+ })
22+ ];
23+
1524 buildInputs = [ jansson ];
1625
17− patchPhase =
26+ patchPhase =
1827 ''
1928 substituteInPlace Makefile --replace "/usr/" "/"
2029 '';
2130
22− preInstall =
31+ preInstall =
2332 ''
2433 export DESTDIR=$out
2534 '';