Hello community,

here is the log from the commit of package id3lib for openSUSE:Factory checked 
in at 2019-10-12 22:34:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/id3lib (Old)
 and      /work/SRC/openSUSE:Factory/.id3lib.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "id3lib"

Sat Oct 12 22:34:30 2019 rev:32 rq:737508 version:3.8.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/id3lib/id3lib.changes    2016-01-12 
16:13:07.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.id3lib.new.2352/id3lib.changes  2019-10-12 
22:34:32.411036090 +0200
@@ -1,0 +2,23 @@
+Fri Oct 11 13:03:11 UTC 2019 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update patch id3lib-3.8.3-autoconf.patch to fix bool
+  availability
+
+-------------------------------------------------------------------
+Fri Oct 11 08:14:48 UTC 2019 - Tomáš Chvátal <tchva...@suse.com>
+
+- Add patch from debian to fix utf string lists:
+  * id3lib-3.8.3-fix-utf16-stringlists.patch
+- Add patch to add wrappers for field encoding:
+  * add-c-wrapper-functions.patch
+- Add patch to fix null pointer check:
+  * id3lib-missing-nullpointer-check.patch
+
+-------------------------------------------------------------------
+Fri Oct 11 08:09:50 UTC 2019 - Tomáš Chvátal <tchva...@suse.com>
+
+- Rename patch id3lib-3.8.3-fix-stack-overrun to
+  id3lib-3.8.3-fix-stack-overrun.patch in order to keep the name
+  sane
+
+-------------------------------------------------------------------
@@ -21 +43,0 @@
- 

Old:
----
  id3lib-3.8.3-fix-stack-overrun

New:
----
  add-c-wrapper-functions.patch
  id3lib-3.8.3-fix-stack-overrun.patch
  id3lib-3.8.3-fix-utf16-stringlists.patch
  id3lib-missing-nullpointer-check.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ id3lib.spec ++++++
--- /var/tmp/diff_new_pack.tdOMlR/_old  2019-10-12 22:34:33.103034330 +0200
+++ /var/tmp/diff_new_pack.tdOMlR/_new  2019-10-12 22:34:33.107034320 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package id3lib
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -20,9 +20,8 @@
 Version:        3.8.3
 Release:        0
 Summary:        A Library for Manipulating ID3v1 and ID3v2 tags
-License:        LGPL-2.1+
-Group:          System/Libraries
-Url:            http://id3lib.sourceforge.net/
+License:        LGPL-2.1-or-later
+URL:            http://id3lib.sourceforge.net/
 Source0:        
http://sourceforge.net/projects/id3lib/files/id3lib/%{version}/%{name}-%{version}.tar.gz
 Source1:        baselibs.conf
 Patch1:         id3lib-%{version}-autoconf.patch
@@ -38,7 +37,10 @@
 Patch10:        id3lib-%{version}-fix_m4_quoting.patch
 Patch11:        id3lib-%{version}-unsigned_argc.patch
 Patch12:        id3lib-%{version}-iomanip_h.patch
-Patch13:        id3lib-%{version}-fix-stack-overrun
+Patch13:        id3lib-%{version}-fix-stack-overrun.patch
+Patch14:        id3lib-3.8.3-fix-utf16-stringlists.patch
+Patch15:        add-c-wrapper-functions.patch
+Patch16:        id3lib-missing-nullpointer-check.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  dos2unix
@@ -48,7 +50,6 @@
 BuildRequires:  libstdc++-devel
 BuildRequires:  libtool
 BuildRequires:  zlib-devel
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 This package provides a software library for manipulating ID3v1 and
@@ -61,7 +62,6 @@
 
 %package      devel
 Summary:        Documentation and Headers for id3lib
-Group:          Development/Libraries/C and C++
 Requires:       %{name} = %{version}
 Requires:       libstdc++-devel
 
@@ -72,7 +72,6 @@
 
 %package      examples
 Summary:        Example Applications for the id3lib Library
-Group:          Development/Libraries/C and C++
 Requires:       %{name} = %{version}
 
 %description   examples
@@ -94,6 +93,9 @@
 %patch11
 %patch12
 %patch13 -p1
+%patch14 -p1
+%patch15 -p1
+%patch16 -p1
 for i in doc/id3v2.3.0{.txt,.html}; do
   dos2unix $i
 done
@@ -107,10 +109,10 @@
   --with-pic \
   --enable-debug=no
 make %{?_smp_mflags}
-make docs
+make -j1 docs
 
 %install
-make DESTDIR=%{buildroot} install %{?_smp_mflags}
+%make_install
 make -C examples clean
 rm -rf examples/.deps
 chmod 644 examples/*
@@ -121,16 +123,14 @@
 %fdupes -s doc
 
 %post -p /sbin/ldconfig
-
 %postun -p /sbin/ldconfig
 
 %files
-%defattr(-, root, root)
-%doc AUTHORS COPYING ChangeLog HISTORY NEWS README THANKS TODO
+%license COPYING
+%doc AUTHORS ChangeLog HISTORY NEWS README THANKS TODO
 %{_libdir}/*.so.*
 
 %files devel
-%defattr(-, root, root)
 %{_includedir}/id3*.h
 %{_includedir}/id3
 %{_libdir}/*.so
@@ -138,7 +138,6 @@
 %doc doc/api
 
 %files examples
-%defattr(-, root, root)
 %doc examples
 %{_bindir}/id3*
 

++++++ add-c-wrapper-functions.patch ++++++
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 */
++++++ id3lib-3.8.3-autoconf.patch ++++++
--- /var/tmp/diff_new_pack.tdOMlR/_old  2019-10-12 22:34:33.135034250 +0200
+++ /var/tmp/diff_new_pack.tdOMlR/_new  2019-10-12 22:34:33.135034250 +0200
@@ -1,3 +1,5 @@
+Index: Makefile.am
+===================================================================
 --- Makefile.am.orig
 +++ Makefile.am
 @@ -11,6 +11,7 @@
@@ -20,6 +22,8 @@
  
  SUBDIRS =  . m4 $(zlib_subdir) doc include id3com src examples
  DIST_SUBDIRS = . m4 zlib doc include id3com src examples prj libprj
+Index: configure.in
+===================================================================
 --- configure.in.orig
 +++ configure.in
 @@ -11,14 +11,82 @@
@@ -231,10 +235,16 @@
  
  CFLAGS="$CFLAGS -Wall"
  
+Index: m4/id3_cxx.m4
+===================================================================
 --- m4/id3_cxx.m4.orig
 +++ m4/id3_cxx.m4
-@@ -84,18 +84,18 @@ AC_DEFUN(ID3_CXX_PORTABILITY,[
-   AC_TRY_RUN([main() { bool b1=true; bool b2=false; }],
+@@ -81,21 +81,21 @@ AC_DEFUN(ID3_CXX_PORTABILITY,[
+ 
+   dnl Check whether we have bool
+   AC_MSG_CHECKING(whether C++ has bool)
+-  AC_TRY_RUN([main() { bool b1=true; bool b2=false; }],
++  AC_TRY_RUN([int main() { bool b1=true; bool b2=false; return 0; }],
               [ AC_MSG_RESULT(yes) ],
               [ AC_MSG_RESULT(no)
 -               AC_DEFINE(CXX_HAS_NO_BOOL) ],
@@ -255,6 +265,8 @@
  
    dnl Done with the portability checks
    AC_LANG_RESTORE
+Index: m4/id3_debug.m4
+===================================================================
 --- m4/id3_debug.m4.orig
 +++ m4/id3_debug.m4
 @@ -3,11 +3,11 @@ AC_DEFUN([ID3_DEBUG],[
@@ -272,6 +284,8 @@
      fi
    fi
  ])
+Index: m4/id3_unicode.m4
+===================================================================
 --- m4/id3_unicode.m4.orig
 +++ m4/id3_unicode.m4
 @@ -9,10 +9,10 @@ AC_DEFUN(ID3_CHECK_ICONV_FORMAT,[

++++++ id3lib-3.8.3-fix-stack-overrun.patch ++++++
From: Jeff Mahoney <je...@suse.com>
Subject: id3lib: Fix stack overrun in Mp3Info::Parse

 VBR_HEADER_MAX_SIZE is currently set to 116, but vbr_header_size can
 add up to 120. This was causing stack overruns on my system.

 The following patch sets the max size appropriately.

Signed-off-by: Jeff Mahoney <je...@suse.com>
---
 src/mp3_parse.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/src/mp3_parse.cpp
+++ b/src/mp3_parse.cpp
@@ -467,7 +467,7 @@ bool Mp3Info::Parse(ID3_Reader& reader,
   // 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) 
   {
++++++ id3lib-3.8.3-fix-utf16-stringlists.patch ++++++
Based on a Debian patch by Urs Fleisch <urs.flei...@gmail.com>
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680915
Index: id3lib-3.8.3/src/io_helpers.cpp
===================================================================
--- id3lib-3.8.3.orig/src/io_helpers.cpp
+++ id3lib-3.8.3/src/io_helpers.cpp
@@ -364,10 +364,17 @@ size_t io::writeUnicodeText(ID3_Writer&
     unicode_t BOM = 0xFEFF;
     writer.writeChars((const unsigned char*) &BOM, 2);
     unsigned char *pdata = (unsigned char *) data.c_str();
+    unicode_t lastCh = BOM;
     for (size_t i = 0; i < size; i += 2)
     {
       unicode_t ch = (pdata[i] << 8) | pdata[i+1];
+      if (lastCh == 0 && ch != BOM)
+      {
+        // Last character was NULL, so start next string with BOM.
+        writer.writeChars((const unsigned char*) &BOM, 2);
+      }
       writer.writeChars((const unsigned char*) &ch, 2);
+      lastCh = ch;
     }
   }
   return writer.getCur() - beg;
++++++ id3lib-missing-nullpointer-check.patch ++++++
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;
   }

Reply via email to