rpms/id3lib/F-7 id3lib-3.8.3-mkstemp.patch, NONE, 1.1 id3lib.spec, 1.13, 1.14

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Mon Aug 20 21:36:59 UTC 2007


Author: jwrdegoede

Update of /cvs/extras/rpms/id3lib/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21580

Modified Files:
	id3lib.spec 
Added Files:
	id3lib-3.8.3-mkstemp.patch 
Log Message:
* Mon Aug 20 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 3.8.3-17
- Use mkstemp instead of insecure tempfile creation (bz 253553)


id3lib-3.8.3-mkstemp.patch:

--- NEW FILE id3lib-3.8.3-mkstemp.patch ---
--- id3lib3.8.3-3.8.3.orig/src/tag_file.cpp
+++ id3lib3.8.3-3.8.3/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();


Index: id3lib.spec
===================================================================
RCS file: /cvs/extras/rpms/id3lib/F-7/id3lib.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- id3lib.spec	22 Nov 2006 21:36:23 -0000	1.13
+++ id3lib.spec	20 Aug 2007 21:36:27 -0000	1.14
@@ -1,14 +1,15 @@
 Summary:	Library for manipulating ID3v1 and ID3v2 tags
 Name:		id3lib
 Version:	3.8.3
-Release:	15%{?dist}
-License:	LGPL
+Release:	17%{?dist}
+License:	LGPLv2+
 Group:		System Environment/Libraries
 URL:		http://id3lib.sourceforge.net/
-Source0:	http://dl.sf.net/sourceforge/id3lib/%{name}-%{version}.tar.gz
+Source0:	http://downloads.sourceforge.net/id3lib/%{name}-%{version}.tar.gz
 Patch0:		id3lib-dox.patch
 Patch1:		id3lib-3.8.3-libtool-autofoo.patch.bz2
 Patch2:		id3lib-3.8.3-io_helpers-163101.patch
+Patch3:		id3lib-3.8.3-mkstemp.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
 BuildRequires:	zlib-devel doxygen
 
@@ -37,10 +38,11 @@
 %patch0 -p0
 %patch1 -p1 -b .libtool-autofoo
 %patch2 -p1 -b .io_helpers-163101
+%patch3 -p1 -b .mkstemp
 chmod -x src/*.h src/*.cpp include/id3/*.h
 sed -i -e 's/\r//' doc/id3v2.3.0.*
 sed -i -e 's|@DOX_DIR_HTML@|%{_docdir}/%{name}-devel-%{version}/api|' \
-    doc/index.html.in
+	doc/index.html.in
 
 
 %build
@@ -83,6 +85,12 @@
 
 
 %changelog
+* Mon Aug 20 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 3.8.3-17
+- Use mkstemp instead of insecure tempfile creation (bz 253553)
+
+* Mon Aug 13 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 3.8.3-16
+- Update License tag for new Licensing Guidelines compliance
+
 * Wed Nov 22 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 3.8.3-15
 - Link libid3-3.8.so.3 with -lz (bug #216783)
 




More information about the fedora-extras-commits mailing list