Skip to content

Commit 9baaf3a

Browse files
committedNov 28, 2017
Re-merge #32126: ffmpeg-3.4: fix CVE CVE-2017-16840
I'm sorry, I merged older version of the PR by accident. (cherry picked from commit fac570a)
1 parent 3ac988a commit 9baaf3a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed
 

‎pkgs/development/libraries/ffmpeg-full/default.nix

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ stdenv, fetchurl, pkgconfig, perl, texinfo, yasm
1+
{ stdenv, fetchurl, fetchpatch, pkgconfig, perl, texinfo, yasm
22
, hostPlatform
33
/*
44
* Licensing options (yes some are listed twice, filters and such are not listed)
@@ -238,15 +238,16 @@ stdenv.mkDerivation rec {
238238
sha256 = "00nq8ng2p16yb48acargaz1hlp9kq24vfwvkqjlslz4a7864k4x8";
239239
};
240240

241-
patchPhase = let
242-
cve_2017_16840_patch = (fetchurl{
241+
patches = [
242+
(fetchurl {
243243
name = "CVE-2017-16840.patch";
244244
url = "http://git.videolan.org/?p=ffmpeg.git;a=patch;h=a94cb36ab2ad99d3a1331c9f91831ef593d94f74";
245-
sha256 = "1rjr9lc71cyy43wsa2zxb9ygya292h9jflvr5wk61nf0vp97gjg3";
246-
});
247-
in
248-
'' patch -p1 < ${cve_2017_16840_patch}
249-
patchShebangs .
245+
sha256 = "0zx0vh110hrykk7j863j04bx6igm2q8dlkv25mf5g4rbxafpqig3";
246+
})
247+
];
248+
249+
prePatch = ''
250+
patchShebangs .
250251
'' + stdenv.lib.optionalString stdenv.isDarwin ''
251252
sed -i 's/#ifndef __MAC_10_11/#if 1/' ./libavcodec/audiotoolboxdec.c
252253
'' + stdenv.lib.optionalString (frei0r != null) ''

0 commit comments

Comments
 (0)
Please sign in to comment.