Skip to content

Commit

Permalink
Merge #248729: libraw: add patch for CVE-2023-1729
Browse files Browse the repository at this point in the history
...into staging
  • Loading branch information
vcunat committed Aug 20, 2023
2 parents 541df05 + 39070fd commit 6c2c30d
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion pkgs/development/libraries/libraw/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, lcms2, pkg-config }:
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, autoreconfHook
, lcms2
, pkg-config

# for passthru.tests
, deepin
, freeimage
, hdrmerge
, imagemagick
, python3
}:

stdenv.mkDerivation rec {
pname = "libraw";
Expand All @@ -11,6 +25,14 @@ stdenv.mkDerivation rec {
sha256 = "sha256-K9mULf6V/TCl5Vu4iuIdSGF9HzQlgNQLRFHIpNbmAlY";
};

patches = [
(fetchpatch {
name = "CVE-2023-1729.patch";
url = "https://github.com/LibRaw/LibRaw/commit/9ab70f6dca19229cb5caad7cc31af4e7501bac93.patch";
hash = "sha256-OAyqphxvtSM15NI77HwtGTmTmP9YNu3xhZ6D1CceJ7I=";
})
];

outputs = [ "out" "lib" "dev" "doc" ];

propagatedBuildInputs = [ lcms2 ];
Expand All @@ -19,6 +41,12 @@ stdenv.mkDerivation rec {

enableParallelBuilding = true;

passthru.tests = {
inherit imagemagick hdrmerge freeimage;
inherit (deepin) deepin-image-viewer;
inherit (python3.pkgs) rawkit;
};

meta = with lib; {
description = "Library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)";
homepage = "https://www.libraw.org/";
Expand Down

0 comments on commit 6c2c30d

Please sign in to comment.