libid3tag: 0.15.1b -> 0.16.3 (#387670)

authored by Sandro and committed by GitHub 7b58779c fb7ea8fe

+46 -152
-13
pkgs/by-name/li/libid3tag/CVE-2017-11550-and-CVE-2017-11551.patch
··· 1 - Common subdirectories: libid3tag-0.15.1b/msvc++ and libid3tag-0.15.1b-patched/msvc++ 2 - diff -uwp libid3tag-0.15.1b/utf16.c libid3tag-0.15.1b-patched/utf16.c 3 - --- libid3tag-0.15.1b/utf16.c 2004-01-23 10:41:32.000000000 +0100 4 - +++ libid3tag-0.15.1b-patched/utf16.c 2018-11-01 13:12:00.866050641 +0100 5 - @@ -250,6 +250,8 @@ id3_ucs4_t *id3_utf16_deserialize(id3_by 6 - id3_ucs4_t *ucs4; 7 - 8 - end = *ptr + (length & ~1); 9 - + if (end == *ptr) 10 - + return 0; 11 - 12 - utf16 = malloc((length / 2 + 1) * sizeof(*utf16)); 13 - if (utf16 == 0)
-89
pkgs/by-name/li/libid3tag/debian-patches.patch
··· 1 - diff --git a/compat.gperf b/compat.gperf 2 - index 4e24613..5635980 100644 3 - --- a/compat.gperf 4 - +++ b/compat.gperf 5 - @@ -236,6 +236,10 @@ int id3_compat_fixup(struct id3_tag *tag) 6 - 7 - encoding = id3_parse_uint(&data, 1); 8 - string = id3_parse_string(&data, end - data, encoding, 0); 9 - + if (!string) 10 - + { 11 - + continue; 12 - + } 13 - 14 - if (id3_ucs4_length(string) < 4) { 15 - free(string); 16 - diff --git a/genre.dat b/genre.dat 17 - index 17acab5..1f02779 100644 18 - --- a/genre.dat 19 - +++ b/genre.dat 20 - @@ -277,8 +277,8 @@ static id3_ucs4_t const genre_PUNK_ROCK[] = 21 - { 'P', 'u', 'n', 'k', ' ', 'R', 'o', 'c', 'k', 0 }; 22 - static id3_ucs4_t const genre_DRUM_SOLO[] = 23 - { 'D', 'r', 'u', 'm', ' ', 'S', 'o', 'l', 'o', 0 }; 24 - -static id3_ucs4_t const genre_A_CAPPELLA[] = 25 - - { 'A', ' ', 'C', 'a', 'p', 'p', 'e', 'l', 'l', 'a', 0 }; 26 - +static id3_ucs4_t const genre_A_CAPELLA[] = 27 - + { 'A', ' ', 'C', 'a', 'p', 'e', 'l', 'l', 'a', 0 }; 28 - static id3_ucs4_t const genre_EURO_HOUSE[] = 29 - { 'E', 'u', 'r', 'o', '-', 'H', 'o', 'u', 's', 'e', 0 }; 30 - static id3_ucs4_t const genre_DANCE_HALL[] = 31 - @@ -452,7 +452,7 @@ static id3_ucs4_t const *const genre_table[] = { 32 - genre_DUET, 33 - genre_PUNK_ROCK, 34 - genre_DRUM_SOLO, 35 - - genre_A_CAPPELLA, 36 - + genre_A_CAPELLA, 37 - genre_EURO_HOUSE, 38 - genre_DANCE_HALL, 39 - genre_GOA, 40 - diff --git a/genre.dat.in b/genre.dat.in 41 - index 872de40..e71e34b 100644 42 - --- a/genre.dat.in 43 - +++ b/genre.dat.in 44 - @@ -153,7 +153,7 @@ Freestyle 45 - Duet 46 - Punk Rock 47 - Drum Solo 48 - -A Cappella 49 - +A Capella 50 - Euro-House 51 - Dance Hall 52 - Goa 53 - diff --git a/parse.c b/parse.c 54 - index 86a3f21..947c249 100644 55 - --- a/parse.c 56 - +++ b/parse.c 57 - @@ -165,6 +165,9 @@ id3_ucs4_t *id3_parse_string(id3_byte_t const **ptr, id3_length_t length, 58 - case ID3_FIELD_TEXTENCODING_UTF_8: 59 - ucs4 = id3_utf8_deserialize(ptr, length); 60 - break; 61 - + default: 62 - + /* FIXME: Unknown encoding! Print warning? */ 63 - + return NULL; 64 - } 65 - 66 - if (ucs4 && !full) { 67 - diff --git a/utf16.c b/utf16.c 68 - index 70ee9d5..6e60a75 100644 69 - --- a/utf16.c 70 - +++ b/utf16.c 71 - @@ -282,5 +282,18 @@ id3_ucs4_t *id3_utf16_deserialize(id3_byte_t const **ptr, id3_length_t length, 72 - 73 - free(utf16); 74 - 75 - + if (end == *ptr && length % 2 != 0) 76 - + { 77 - + /* We were called with a bogus length. It should always 78 - + * be an even number. We can deal with this in a few ways: 79 - + * - Always give an error. 80 - + * - Try and parse as much as we can and 81 - + * - return an error if we're called again when we 82 - + * already tried to parse everything we can. 83 - + * - tell that we parsed it, which is what we do here. 84 - + */ 85 - + (*ptr)++; 86 - + } 87 - + 88 - return ucs4; 89 - }
-11
pkgs/by-name/li/libid3tag/id3tag.pc
··· 1 - prefix=@out@ 2 - exec_prefix=${prefix} 3 - libdir=${exec_prefix}/lib 4 - includedir=@dev@/include 5 - 6 - Name: libid3tag 7 - Description: ID3 tag manipulation library 8 - Version: @version@ 9 - 10 - Libs: -L${libdir} -lid3tag 11 - Cflags: -I${includedir}
+34 -32
pkgs/by-name/li/libid3tag/package.nix
··· 1 - { lib, stdenv, fetchurl, zlib, gperf_3_0 }: 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitea, 5 + cmake, 6 + gperf, 7 + zlib, 8 + }: 2 9 3 10 stdenv.mkDerivation rec { 4 11 pname = "libid3tag"; 5 - version = "0.15.1b"; 12 + version = "0.16.3"; 6 13 7 - src = fetchurl { 8 - url = "mirror://sourceforge/mad/libid3tag-${version}.tar.gz"; 9 - sha256 = "63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151"; 14 + outputs = [ 15 + "out" 16 + "dev" 17 + ]; 18 + 19 + src = fetchFromGitea { 20 + domain = "codeberg.org"; 21 + owner = "tenacityteam"; 22 + repo = "libid3tag"; 23 + rev = version; 24 + hash = "sha256-6/49rk7pmIpJRj32WmxC171NtdIOaMNhX8RD7o6Jbzs="; 10 25 }; 11 26 12 - outputs = [ "out" "dev" ]; 13 - setOutputFlags = false; 27 + postPatch = '' 28 + substituteInPlace packaging/id3tag.pc.in \ 29 + --replace-fail "\''${prefix}/@CMAKE_INSTALL_LIBDIR@" "@CMAKE_INSTALL_FULL_LIBDIR@" 30 + ''; 14 31 15 32 strictDeps = true; 16 33 17 - nativeBuildInputs = [ gperf_3_0 ]; 18 - 19 - buildInputs = [ zlib ]; 34 + nativeBuildInputs = [ 35 + cmake 36 + gperf 37 + ]; 20 38 21 - patches = [ 22 - ./debian-patches.patch 23 - ./CVE-2017-11550-and-CVE-2017-11551.patch 39 + buildInputs = [ 40 + zlib 24 41 ]; 25 42 26 - preConfigure = '' 27 - configureFlagsArray+=( 28 - --includedir=$dev/include 29 - ) 30 - ''; 31 - 32 - postInstall = '' 33 - mkdir -p $dev/lib/pkgconfig 34 - cp ${./id3tag.pc} $dev/lib/pkgconfig/id3tag.pc 35 - substituteInPlace $dev/lib/pkgconfig/id3tag.pc \ 36 - --subst-var-by out $out \ 37 - --subst-var-by dev $dev \ 38 - --subst-var-by version "${version}" 39 - ''; 40 - 41 - meta = with lib; { 43 + meta = { 42 44 description = "ID3 tag manipulation library"; 43 - homepage = "https://mad.sourceforge.net/"; 44 - license = licenses.gpl2; 45 + homepage = "https://codeberg.org/tenacityteam/libid3tag"; 46 + license = lib.licenses.gpl2Plus; 45 47 maintainers = [ ]; 46 - platforms = platforms.unix; 48 + platforms = lib.platforms.unix; 47 49 }; 48 50 }
+10 -7
pkgs/by-name/mp/mp3fs/package.nix
··· 10 10 autoreconfHook, 11 11 pkg-config, 12 12 pandoc, 13 + zlib, 13 14 }: 14 15 15 16 stdenv.mkDerivation rec { ··· 25 26 26 27 postPatch = '' 27 28 substituteInPlace src/mp3fs.cc \ 28 - --replace "#include <fuse_darwin.h>" "" \ 29 - --replace "osxfuse_version()" "fuse_version()" 29 + --replace-fail "#include <fuse_darwin.h>" "" \ 30 + --replace-fail "osxfuse_version()" "fuse_version()" 30 31 ''; 31 32 33 + nativeBuildInputs = [ 34 + autoreconfHook 35 + pkg-config 36 + pandoc 37 + ]; 38 + 32 39 buildInputs = [ 33 40 flac 34 41 fuse 35 42 lame 36 43 libid3tag 37 44 libvorbis 38 - ]; 39 - nativeBuildInputs = [ 40 - autoreconfHook 41 - pkg-config 42 - pandoc 45 + zlib 43 46 ]; 44 47 45 48 enableParallelBuilding = true;
+2
pkgs/development/libraries/librdf/raptor.nix
··· 33 33 ]; 34 34 maintainers = [ lib.maintainers.marcweber ]; 35 35 platforms = lib.platforms.linux; 36 + # error: passing argument 2 of 'xmlSetStructuredErrorFunc' from incompatible pointer type [-Wincompatible-pointer-types] 37 + broken = true; 36 38 }; 37 39 }