Merge pull request #67362 from mmahut/CVE-2019-14493

opencv: CVE-2019-14493
This commit is contained in:
Samuel Leathers 2019-08-23 14:53:43 -04:00 committed by GitHub
commit e7581c2976
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
{ lib, stdenv
, fetchurl, fetchFromGitHub
, fetchurl, fetchFromGitHub, fetchpatch
, cmake, pkgconfig, unzip, zlib, pcre, hdf5
, glog, boost, gflags, protobuf
, config
@ -160,6 +160,14 @@ stdenv.mkDerivation rec {
cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/source/opencv_contrib"
'';
patches = [
(fetchpatch {
url = "https://github.com/opencv/opencv/commit/5691d998ead1d9b0542bcfced36c2dceb3a59023.patch";
name = "CVE-2019-14493.patch";
sha256 = "14qva9f5z10apz5q0skdyiclr9sgkhab4fzksy1w3b6j6hg4wm7m";
})
];
# This prevents cmake from using libraries in impure paths (which
# causes build failure on non NixOS)
# Also, work around https://github.com/NixOS/nixpkgs/issues/26304 with