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
This commit is contained in:
Daniel Brockman 2017-03-10 21:59:38 +01:00 committed by Jörg Thalheim
parent b3c14bbf03
commit 5d6ea2d64e
No known key found for this signature in database
GPG Key ID: CA4106B8D7CC79FA

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, jansson }: { stdenv, lib, fetchFromGitHub, fetchpatch, jansson }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "jshon-20140712"; name = "jshon-20140712";
@ -12,6 +12,15 @@ stdenv.mkDerivation rec {
repo = "jshon"; repo = "jshon";
}; };
patches = [
# Fix null termination in read_stream.
# https://github.com/keenerd/jshon/issues/53
(fetchpatch {
url = https://github.com/mbrock/jshon/commit/32288dd186573ceb58164f30be1782d4580466d8.patch;
sha256 = "04rss2nprl9nqblc7smq0477n54hm801xgnnmvyzni313i1n6vhl";
})
];
buildInputs = [ jansson ]; buildInputs = [ jansson ];
patchPhase = patchPhase =