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