Merge pull request #31634 from yegortimoshenko/bchunk/1.2.2

bchunk: 1.2.0 -> 1.2.2

authored by Franz Pletz and committed by GitHub f6ad758c 1f645d2c

+3 -62
-25
pkgs/tools/cd-dvd/bchunk/CVE-2017-15953.patch
··· 1 - --- a/bchunk.c 2017-10-30 18:03:58.658741629 +0000 2 - +++ b/bchunk.c 2017-10-30 19:40:25.558131619 +0000 3 - @@ -18,6 +18,7 @@ 4 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 5 - */ 6 - 7 - +#define _GNU_SOURCE 8 - #include <stdio.h> 9 - #include <stdlib.h> 10 - #include <string.h> 11 - @@ -271,11 +272,10 @@ 12 - int16_t i; 13 - float fl; 14 - 15 - - if (!(fname = malloc(strlen(bname) + 8))) { 16 - - fprintf(stderr, "main(): malloc() failed, out of memory\n"); 17 - + if (asprintf(&fname, "%s%2.2d.%s", bname, track->num, track->extension) == -1) { 18 - + fprintf(stderr, "writetrack(): asprintf() failed, out of memory\n"); 19 - exit(4); 20 - } 21 - - sprintf(fname, "%s%2.2d.%s", bname, track->num, track->extension); 22 - 23 - printf("%2d: %s ", track->num, fname); 24 - 25 -
-33
pkgs/tools/cd-dvd/bchunk/CVE-2017-15955.patch
··· 1 - diff -urNZ bchunk-1.2.0.orig/bchunk.c bchunk-1.2.0/bchunk.c 2 - --- a/bchunk.c 2017-10-30 18:03:58.658741629 +0000 3 - +++ b/bchunk.c 2017-10-30 19:17:36.732855884 +0000 4 - @@ -426,11 +426,11 @@ 5 - printf("\nTrack "); 6 - if (!(p = strchr(p, ' '))) { 7 - fprintf(stderr, "... ouch, no space after TRACK.\n"); 8 - - continue; 9 - + exit(3); 10 - } 11 - p++; 12 - if (!(t = strchr(p, ' '))) { 13 - fprintf(stderr, "... ouch, no space after track number.\n"); 14 - - continue; 15 - + exit(3); 16 - } 17 - *t = '\0'; 18 - 19 - @@ -460,12 +460,12 @@ 20 - } else if ((p = strstr(s, "INDEX"))) { 21 - if (!(p = strchr(p, ' '))) { 22 - printf("... ouch, no space after INDEX.\n"); 23 - - continue; 24 - + exit(3); 25 - } 26 - p++; 27 - if (!(t = strchr(p, ' '))) { 28 - printf("... ouch, no space after index number.\n"); 29 - - continue; 30 - + exit(3); 31 - } 32 - *t = '\0'; 33 - t++;
+3 -4
pkgs/tools/cd-dvd/bchunk/default.nix
··· 1 1 { stdenv, fetchurl }: 2 2 3 3 stdenv.mkDerivation rec { 4 - name = "bchunk-1.2.0"; 4 + name = "bchunk-${version}"; 5 + version = "1.2.2"; 5 6 6 7 src = fetchurl { 7 8 url = "http://he.fi/bchunk/${name}.tar.gz"; 8 - sha256 = "0pcbyx3689cbl23dcij497hb3q5f1wmki7cxic5nzldx71g9vp5g"; 9 + sha256 = "12dxx98kbpc5z4dgni25280088bhlsb677rp832r82zzc1drpng7"; 9 10 }; 10 - 11 - patches = [ ./CVE-2017-15953.patch ./CVE-2017-15955.patch ]; 12 11 13 12 installPhase = '' 14 13 install -Dt $out/bin bchunk