diff options
Diffstat (limited to 'libraries/id3lib/patches')
-rw-r--r-- | libraries/id3lib/patches/id3lib-3.8.3-GCC43FIX-1.patch | 90 | ||||
-rw-r--r-- | libraries/id3lib/patches/id3lib.c_wrapper.patch | 58 | ||||
-rw-r--r-- | libraries/id3lib/patches/id3lib.cppheaders.patch | 22 | ||||
-rw-r--r-- | libraries/id3lib/patches/id3lib.manpages.patch | 198 | ||||
-rw-r--r-- | libraries/id3lib/patches/id3lib.mkstemp.patch | 54 | ||||
-rw-r--r-- | libraries/id3lib/patches/id3lib.nullpointer_check.patch | 12 | ||||
-rw-r--r-- | libraries/id3lib/patches/id3lib.utf8_writing.patch (renamed from libraries/id3lib/patches/id3lib_3.8.3_UTF16_writing_bug.patch) | 11 | ||||
-rw-r--r-- | libraries/id3lib/patches/id3lib.vbr_stack_smash.patch | 19 | ||||
-rw-r--r-- | libraries/id3lib/patches/id3lib_Doxyfile.patch | 22 |
9 files changed, 368 insertions, 118 deletions
diff --git a/libraries/id3lib/patches/id3lib-3.8.3-GCC43FIX-1.patch b/libraries/id3lib/patches/id3lib-3.8.3-GCC43FIX-1.patch deleted file mode 100644 index cae30e1870..0000000000 --- a/libraries/id3lib/patches/id3lib-3.8.3-GCC43FIX-1.patch +++ /dev/null @@ -1,90 +0,0 @@ -Submitted By: zippo zippo@oppiz.net -Date: 2008-10-28 -Initial Package Version: 3.8.3 -Upstream Status: Unknown -Origin: zippo@oppiz.net -Description:Fixes things up for GCC-4.3.2 - -diff -Naur id3lib-3.8.3/examples/demo_convert.cpp 32/id3lib-3.8.3/examples/demo_convert.cpp ---- id3lib-3.8.3/examples/demo_convert.cpp 2003-03-02 00:23:00.000000000 +0000 -+++ 32/id3lib-3.8.3/examples/demo_convert.cpp 2008-10-29 20:10:04.000000000 +0000 -@@ -84,7 +84,7 @@ - } - } - --int main( unsigned int argc, char * const argv[]) -+int main(int argc, char * const argv[]) - { - flags_t ulFlag = ID3TT_ALL; - gengetopt_args_info args; -diff -Naur id3lib-3.8.3/examples/demo_copy.cpp 32/id3lib-3.8.3/examples/demo_copy.cpp ---- id3lib-3.8.3/examples/demo_copy.cpp 2003-03-02 00:23:00.000000000 +0000 -+++ 32/id3lib-3.8.3/examples/demo_copy.cpp 2008-10-29 20:10:54.000000000 +0000 -@@ -81,7 +81,7 @@ - } - } - --int main( unsigned int argc, char * const argv[]) -+int main(int argc, char * const argv[]) - { - int ulFlag = ID3TT_ID3; - ID3D_INIT_DOUT(); -diff -Naur id3lib-3.8.3/examples/demo_info.cpp 32/id3lib-3.8.3/examples/demo_info.cpp ---- id3lib-3.8.3/examples/demo_info.cpp 2003-03-02 00:23:00.000000000 +0000 -+++ 32/id3lib-3.8.3/examples/demo_info.cpp 2008-10-29 20:09:31.000000000 +0000 -@@ -309,7 +309,7 @@ - - #define DEBUG - --int main( unsigned int argc, char * const argv[]) -+int main(int argc, char * const argv[]) - { - ID3D_INIT_DOUT(); - -diff -Naur id3lib-3.8.3/examples/demo_tag.cpp 32/id3lib-3.8.3/examples/demo_tag.cpp ---- id3lib-3.8.3/examples/demo_tag.cpp 2003-03-02 00:23:00.000000000 +0000 -+++ 32/id3lib-3.8.3/examples/demo_tag.cpp 2008-10-29 20:10:26.000000000 +0000 -@@ -46,7 +46,7 @@ - os << "v2"; - } - --int main( unsigned int argc, char * const argv[]) -+int main(int argc, char * const argv[]) - { - int ulFlag = ID3TT_ID3; - ID3D_INIT_DOUT(); -diff -Naur id3lib-3.8.3/include/id3/id3lib_strings.h 32/id3lib-3.8.3/include/id3/id3lib_strings.h ---- id3lib-3.8.3/include/id3/id3lib_strings.h 2003-03-02 00:23:00.000000000 +0000 -+++ 32/id3lib-3.8.3/include/id3/id3lib_strings.h 2008-10-29 20:03:28.000000000 +0000 -@@ -30,6 +30,7 @@ - #define _ID3LIB_STRINGS_H_ - - #include <string> -+#include "string.h" - - #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000)) - namespace std -diff -Naur id3lib-3.8.3/include/id3/writers.h 32/id3lib-3.8.3/include/id3/writers.h ---- id3lib-3.8.3/include/id3/writers.h 2003-03-02 00:23:00.000000000 +0000 -+++ 32/id3lib-3.8.3/include/id3/writers.h 2008-10-29 20:05:56.000000000 +0000 -@@ -30,7 +30,7 @@ - - #include "id3/writer.h" - #include "id3/id3lib_streams.h" --//#include <string.h> -+#include "string.h" - - class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer - { -diff -Naur id3lib-3.8.3/src/field.cpp 32/id3lib-3.8.3/src/field.cpp ---- id3lib-3.8.3/src/field.cpp 2003-03-02 00:23:00.000000000 +0000 -+++ 32/id3lib-3.8.3/src/field.cpp 2008-10-29 20:02:19.000000000 +0000 -@@ -33,6 +33,8 @@ - #include "readers.h" - #include <assert.h> - -+#include "string.h" -+ - using namespace dami; - - // This is used for unimplemented frames so that their data is preserved when diff --git a/libraries/id3lib/patches/id3lib.c_wrapper.patch b/libraries/id3lib/patches/id3lib.c_wrapper.patch new file mode 100644 index 0000000000..d72e81c0ec --- /dev/null +++ b/libraries/id3lib/patches/id3lib.c_wrapper.patch @@ -0,0 +1,58 @@ +This patch adds C wrapper functions for field encoding. + +It was first introduced in version 3.8.3-8 and fixes +http://bugs.debian.org/281292 +--- a/include/id3.h ++++ b/include/id3.h +@@ -104,6 +104,9 @@ + ID3_C_EXPORT void CCONV ID3Field_GetBINARY (const ID3Field *field, uchar *buffer, size_t buffLength); + ID3_C_EXPORT void CCONV ID3Field_FromFile (ID3Field *field, const char *fileName); + ID3_C_EXPORT void CCONV ID3Field_ToFile (const ID3Field *field, const char *fileName); ++ ID3_C_EXPORT bool CCONV ID3Field_SetEncoding (ID3Field *field, ID3_TextEnc enc); ++ ID3_C_EXPORT ID3_TextEnc CCONV ID3Field_GetEncoding (const ID3Field *field); ++ ID3_C_EXPORT bool CCONV ID3Field_IsEncodable (const ID3Field *field); + + /* field-info wrappers */ + ID3_C_EXPORT char* CCONV ID3FrameInfo_ShortName (ID3_FrameID frameid); +--- a/src/c_wrapper.cpp ++++ b/src/c_wrapper.cpp +@@ -681,6 +681,39 @@ + } + } + ++ ID3_C_EXPORT bool CCONV ++ ID3Field_SetEncoding(ID3Field *field, ID3_TextEnc enc) ++ { ++ bool changed = false; ++ if (field) ++ { ++ ID3_CATCH(changed = reinterpret_cast<ID3_Field *>(field)->SetEncoding(enc)); ++ } ++ return changed; ++ } ++ ++ ID3_C_EXPORT ID3_TextEnc CCONV ++ ID3Field_GetEncoding(const ID3Field *field) ++ { ++ ID3_TextEnc enc = ID3TE_NONE; ++ if (field) ++ { ++ ID3_CATCH(enc = reinterpret_cast<const ID3_Field *>(field)->GetEncoding()); ++ } ++ return enc; ++ } ++ ++ ID3_C_EXPORT bool CCONV ++ ID3Field_IsEncodable(const ID3Field *field) ++ { ++ bool isEncodable = false; ++ if (field) ++ { ++ ID3_CATCH(isEncodable = reinterpret_cast<const ID3_Field *>(field)->IsEncodable()); ++ } ++ return isEncodable; ++ } ++ + #ifdef __cplusplus + } + #endif /* __cplusplus */ diff --git a/libraries/id3lib/patches/id3lib.cppheaders.patch b/libraries/id3lib/patches/id3lib.cppheaders.patch new file mode 100644 index 0000000000..a9b45ab02c --- /dev/null +++ b/libraries/id3lib/patches/id3lib.cppheaders.patch @@ -0,0 +1,22 @@ +This patch imports the proper C++ headers +--- a/include/id3/id3lib_strings.h ++++ b/include/id3/id3lib_strings.h +@@ -30,6 +30,7 @@ + #define _ID3LIB_STRINGS_H_ + + #include <string> ++#include <cstring> + + #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000)) + namespace std +--- a/include/id3/writers.h ++++ b/include/id3/writers.h +@@ -30,7 +30,7 @@ + + #include "id3/writer.h" + #include "id3/id3lib_streams.h" +-//#include <string.h> ++#include <cstring> + + class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer + { diff --git a/libraries/id3lib/patches/id3lib.manpages.patch b/libraries/id3lib/patches/id3lib.manpages.patch new file mode 100644 index 0000000000..cebf3d4d40 --- /dev/null +++ b/libraries/id3lib/patches/id3lib.manpages.patch @@ -0,0 +1,198 @@ +This patch adds debian-made man pages +--- /dev/null ++++ b/doc/man/id3info.1 +@@ -0,0 +1,31 @@ ++.TH ID3INFO 1 "May 2000" local "User Command" ++.SH NAME ++id3info \- Display id3 tag information. ++.SH SYNOPSIS ++.B id3info ++.RB [ ++.I OPTION ++.RB ] ++.RB [ ++.I FILE ++.RB ] ++.br ++.SH DESCRIPTION ++.B Id3info ++displays both the id3v1 and id3v2 tag information for a file. ++Id3info will not differentiate between the two types of tags. ++.SH OPTIONS ++.TP ++.B \-h, \-\-help ++Display help and exit ++.TP ++.B \-v, \-\-version ++Display version information and exit ++.SH SEE ALSO ++id3convert(1), id3tag(1), id3v2(1) ++.SH AUTHOR ++.B id3lib ++was originally designed and implemented by Dirk Mahoney and is ++maintained by Scott Thomas Haug <sth2@cs.wustl.edu>. Manual page written for ++Debian GNU/Linux by Robert Woodcock <rcw@debian.org>. ++ +--- /dev/null ++++ b/doc/man/id3tag.1 +@@ -0,0 +1,69 @@ ++.TH ID3TAG 1 "May 2000" local "User Command" ++.SH NAME ++id3tag \- Tags an mp3 file with id3v1 and/or id3v2 tags. ++.SH SYNOPSIS ++.B id3tag ++.RB [ ++.I OPTION ++.RB ] ... ++.RB [ ++.I FILE ++.RB ] ... ++.br ++.SH DESCRIPTION ++.B Id3tag ++will render both types of tag by default. Only the last ++tag type indicated in the option list will be used. Non- ++rendered will remain unchanged in the original file. Will ++also parse and convert Lyrics3 v2.0 frames, but will not ++render them. ++ ++.SH OPTIONS ++.TP ++.B \-1, \-\-v1tag ++Render only the id3v1 tag ++.TP ++.B \-2, \-\-v2tag ++Render only the id3v2 tag ++.TP ++.B \-h, \-\-help ++Display help and exit ++.TP ++.B \-v, \-\-version ++Display version information and exit ++.TP ++.B \-a, \-\-artist ARTIST ++Set the artist information ++.TP ++.B \-s, \-\-song SONG ++Set the song title information ++.TP ++.B \-A, \-\-album ALBUM ++Set the album title information ++.TP ++.B \-c, \-\-comment COMMENT ++Set the comment information ++.TP ++.B \-C, \-\-desc DESCRIPTION ++Set the comment description ++.TP ++.B \-g, \-\-genre num ++Set the genre number ++.TP ++.B \-y, \-\-year num ++Set the year ++.TP ++.B \-t, \-\-track num ++Set the track number ++.TP ++.B \-T, \-\-total num ++Set the total number of tracks on the album ++ ++.SH SEE ALSO ++id3convert(1), id3info(1), id3v2(1) ++.SH AUTHOR ++.B id3lib ++was originally designed and implemented by Dirk Mahoney and is ++maintained by Scott Thomas Haug <sth2@cs.wustl.edu>. Manual page written for ++Debian GNU/Linux by Robert Woodcock <rcw@debian.org>. ++ +--- /dev/null ++++ b/doc/man/id3convert.1 +@@ -0,0 +1,47 @@ ++.TH ID3CONVERT 1 "May 2000" local "User Command" ++.SH NAME ++id3convert \- Converts between id3v1 and id3v2 tags of an mp3 file. ++.SH SYNOPSIS ++.B id3convert ++.RB [ ++.I OPTION ++.RB ] ++.RB [ ++.I FILE ++.RB ] ++.br ++.SH DESCRIPTION ++.B Id3convert ++converts between id3v1 and id3v2 tags of an mp3 file. Id3convert will render ++both types of tag by default. Only the last tag type indicated in the option ++list will be used. Non-rendered tags will remain unchanged in the original ++file. Id3convert will also parse and convert Lyrics3 v2.0 frames, but will ++not render them. ++ ++.SH OPTIONS ++.TP ++.B \-1, \-\-v1tag ++Render only the id3v1 tag ++.TP ++.B \-2, \-\-v2tag ++Render only the id3v2 tag ++.TP ++.B \-s, \-\-strip ++Strip, rather than render, the tags ++.TP ++.B \-p, \-\-padding ++Use padding in the tag ++.TP ++.B \-h, \-\-help ++Display help and exit ++.TP ++.B \-v, \-\-version ++Display version information and exit ++ ++.SH SEE ALSO ++id3tag(1), id3info(1), id3v2(1) ++.SH AUTHOR ++.B id3lib ++was originally designed and implemented by Dirk Mahoney and is ++maintained by Scott Thomas Haug <sth2@cs.wustl.edu>. Manual page written for ++Debian GNU/Linux by Robert Woodcock <rcw@debian.org>. +--- /dev/null ++++ b/doc/man/id3cp.1 +@@ -0,0 +1,38 @@ ++.TH ID3CP 1 "July 2001" local "User Command" ++.SH NAME ++id3cp \- Copies tags from one file to another. ++.SH SYNOPSIS ++.B id3cp ++.RB [ ++.I OPTION ++.RB ] ... ++.RB [ ++.I SOURCE ++.RB ] ++.RB [ ++.I DEST ++.RB ] ++.br ++.SH DESCRIPTION ++.B Id3cp ++copies tags from SOURCE to DEST. ++.SH OPTIONS ++.TP ++.B \-1, \-\-v1tag ++Render only the id3v1 tag ++.TP ++.B \-2, \-\-v2tag ++Render only the id3v2 tag ++.TP ++.B \-h, \-\-help ++Display help and exit ++.TP ++.B \-v, \-\-version ++Display version information and exit ++.SH SEE ALSO ++id3convert(1), id3info(1), id3v2(1) ++.SH AUTHOR ++.B id3lib ++was originally designed and implemented by Dirk Mahoney and is ++maintained by Scott Thomas Haug <sth2@cs.wustl.edu>. Manual page written for ++Debian GNU/Linux by Robert Woodcock <rcw@debian.org>. diff --git a/libraries/id3lib/patches/id3lib.mkstemp.patch b/libraries/id3lib/patches/id3lib.mkstemp.patch new file mode 100644 index 0000000000..36c84179fc --- /dev/null +++ b/libraries/id3lib/patches/id3lib.mkstemp.patch @@ -0,0 +1,54 @@ +This patch fixes an issues where temporary files were created in an insecure +way. + +It was first intruduced in version 3.8.3-7 and fixes +http://bugs.debian.org/438540 +--- a/src/tag_file.cpp ++++ b/src/tag_file.cpp +@@ -242,8 +242,8 @@ + strcpy(sTempFile, filename.c_str()); + strcat(sTempFile, sTmpSuffix.c_str()); + +-#if ((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP)) +- // This section is for Windows folk && gcc 3.x folk ++#if !defined(HAVE_MKSTEMP) ++ // This section is for Windows folk + fstream tmpOut; + createFile(sTempFile, tmpOut); + +@@ -257,7 +257,7 @@ + tmpOut.write((char *)tmpBuffer, nBytes); + } + +-#else //((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP)) ++#else //!defined(HAVE_MKSTEMP) + + // else we gotta make a temp file, copy the tag into it, copy the + // rest of the old file after the tag, delete the old file, rename +@@ -270,7 +270,7 @@ + //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file"); + } + +- ofstream tmpOut(fd); ++ ofstream tmpOut(sTempFile); + if (!tmpOut) + { + tmpOut.close(); +@@ -285,14 +285,14 @@ + uchar tmpBuffer[BUFSIZ]; + while (file) + { +- file.read(tmpBuffer, BUFSIZ); ++ file.read((char *)tmpBuffer, BUFSIZ); + size_t nBytes = file.gcount(); +- tmpOut.write(tmpBuffer, nBytes); ++ tmpOut.write((char *)tmpBuffer, nBytes); + } + + close(fd); //closes the file + +-#endif ////((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP)) ++#endif ////!defined(HAVE_MKSTEMP) + + tmpOut.close(); + file.close(); diff --git a/libraries/id3lib/patches/id3lib.nullpointer_check.patch b/libraries/id3lib/patches/id3lib.nullpointer_check.patch new file mode 100644 index 0000000000..d4ca5d292f --- /dev/null +++ b/libraries/id3lib/patches/id3lib.nullpointer_check.patch @@ -0,0 +1,12 @@ +This patch adds a check for a null pointer +--- a/src/header_tag.cpp ++++ b/src/header_tag.cpp +@@ -54,7 +54,7 @@ + { + size_t bytesUsed = ID3_TagHeader::SIZE; + +- if (_info->is_extended) ++ if (_info && _info->is_extended) + { + bytesUsed += _info->extended_bytes; + } diff --git a/libraries/id3lib/patches/id3lib_3.8.3_UTF16_writing_bug.patch b/libraries/id3lib/patches/id3lib.utf8_writing.patch index b05d2cf298..3d3f50fed6 100644 --- a/libraries/id3lib/patches/id3lib_3.8.3_UTF16_writing_bug.patch +++ b/libraries/id3lib/patches/id3lib.utf8_writing.patch @@ -1,6 +1,6 @@ -diff -ruN id3lib-3.8.3.orig/ChangeLog id3lib-3.8.3/ChangeLog ---- id3lib-3.8.3.orig/ChangeLog 2003-03-02 01:23:00.000000000 +0100 -+++ id3lib-3.8.3/ChangeLog 2006-02-22 00:33:59.946214472 +0100 +Patch from 'Spoon' to fix issues with writing certain unicode characters +--- a/ChangeLog ++++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-02-17 Jerome Couderc + @@ -10,9 +10,8 @@ diff -ruN id3lib-3.8.3.orig/ChangeLog id3lib-3.8.3/ChangeLog 2003-03-02 Sunday 17:38 Thijmen Klok <thijmen@id3lib.org> * THANKS (1.20): added more people -diff -ruN id3lib-3.8.3.orig/src/io_helpers.cpp id3lib-3.8.3/src/io_helpers.cpp ---- id3lib-3.8.3.orig/src/io_helpers.cpp 2003-03-02 01:23:00.000000000 +0100 -+++ id3lib-3.8.3/src/io_helpers.cpp 2006-02-22 00:35:02.926639992 +0100 +--- a/src/io_helpers.cpp ++++ b/src/io_helpers.cpp @@ -363,11 +363,22 @@ // Write the BOM: 0xFEFF unicode_t BOM = 0xFEFF; diff --git a/libraries/id3lib/patches/id3lib.vbr_stack_smash.patch b/libraries/id3lib/patches/id3lib.vbr_stack_smash.patch new file mode 100644 index 0000000000..9bf33e9787 --- /dev/null +++ b/libraries/id3lib/patches/id3lib.vbr_stack_smash.patch @@ -0,0 +1,19 @@ +Description: Fix crashes when reading VBR MP3 file. +Bug-Ubuntu: https://launchpad.net/bugs/444466 +Origin: upstream, http://sourceforge.net/tracker/?func=detail&aid=937707&group_id=979&atid=300979 +Forwarded: yes +Author: Urs Fleisch + +Index: id3lib3.8.3-3.8.3/src/mp3_parse.cpp +=================================================================== +--- id3lib3.8.3-3.8.3.orig/src/mp3_parse.cpp 2009-10-06 23:12:10.381250132 +0200 ++++ id3lib3.8.3-3.8.3/src/mp3_parse.cpp 2009-10-06 23:14:09.545252591 +0200 +@@ -465,7 +465,7 @@ + // from http://www.xingtech.com/developer/mp3/ + + const size_t VBR_HEADER_MIN_SIZE = 8; // "xing" + flags are fixed +- const size_t VBR_HEADER_MAX_SIZE = 116; // frames, bytes, toc and scale are optional ++ const size_t VBR_HEADER_MAX_SIZE = 120; // frames, bytes, toc and scale are optional + + if (mp3size >= vbr_header_offest + VBR_HEADER_MIN_SIZE) + { diff --git a/libraries/id3lib/patches/id3lib_Doxyfile.patch b/libraries/id3lib/patches/id3lib_Doxyfile.patch deleted file mode 100644 index 76288cbb05..0000000000 --- a/libraries/id3lib/patches/id3lib_Doxyfile.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/Doxyfile.in 2005-01-05 14:27:05.000000000 +0100 -+++ b/Doxyfile.in 2005-01-05 14:30:19.000000000 +0100 -@@ -263,14 +263,17 @@ - - INPUT = ../src \ - ../include/id3/field.h \ -- ../include/id3/frame.h \ - ../include/id3/globals.h \ -+ ../include/id3/helpers.h \ -+ ../include/id3/id3lib_frame.h \ -+ ../include/id3/id3lib_streams.h \ -+ ../include/id3/id3lib_strings.h \ - ../include/id3/misc_support.h \ - ../include/id3/reader.h \ - ../include/id3/readers.h \ - ../include/id3/sized_types.h \ - ../include/id3/tag.h \ -- ../include/id3/tag.h \ -+ ../include/id3/utils.h \ - ../include/id3/writer.h \ - ../include/id3/writers.h - |