Skip to content

Commit

Permalink
Re-merge #32126: ffmpeg-3.4: fix CVE CVE-2017-16840
Browse files Browse the repository at this point in the history
I'm sorry, I merged older version of the PR by accident.

(cherry picked from commit fac570a)
  • Loading branch information
vcunat committed Nov 28, 2017
1 parent 3ac988a commit 9baaf3a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pkgs/development/libraries/ffmpeg-full/default.nix
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, perl, texinfo, yasm
{ stdenv, fetchurl, fetchpatch, pkgconfig, perl, texinfo, yasm
, hostPlatform
/*
* Licensing options (yes some are listed twice, filters and such are not listed)
Expand Down Expand Up @@ -238,15 +238,16 @@ stdenv.mkDerivation rec {
sha256 = "00nq8ng2p16yb48acargaz1hlp9kq24vfwvkqjlslz4a7864k4x8";
};

patchPhase = let
cve_2017_16840_patch = (fetchurl{
patches = [
(fetchurl {
name = "CVE-2017-16840.patch";
url = "http://git.videolan.org/?p=ffmpeg.git;a=patch;h=a94cb36ab2ad99d3a1331c9f91831ef593d94f74";
sha256 = "1rjr9lc71cyy43wsa2zxb9ygya292h9jflvr5wk61nf0vp97gjg3";
});
in
'' patch -p1 < ${cve_2017_16840_patch}
patchShebangs .
sha256 = "0zx0vh110hrykk7j863j04bx6igm2q8dlkv25mf5g4rbxafpqig3";
})
];

prePatch = ''
patchShebangs .
'' + stdenv.lib.optionalString stdenv.isDarwin ''
sed -i 's/#ifndef __MAC_10_11/#if 1/' ./libavcodec/audiotoolboxdec.c
'' + stdenv.lib.optionalString (frei0r != null) ''
Expand Down

0 comments on commit 9baaf3a

Please sign in to comment.