rpms/file/devel file-4.17-init-mem.patch, NONE, 1.1 file-4.17-mp3_flac.patch, NONE, 1.1 file-4.17-wctype-header.patch, NONE, 1.1 file.spec, 1.47, 1.48

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Mar 14 08:39:54 UTC 2006


Author: rvokal

Update of /cvs/dist/rpms/file/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv14675

Modified Files:
	file.spec 
Added Files:
	file-4.17-init-mem.patch file-4.17-mp3_flac.patch 
	file-4.17-wctype-header.patch 
Log Message:
 - fix segfault when compiling magic
 - add check for wctype.h
 - fix for flac and mp3 files



file-4.17-init-mem.patch:
 apprentice.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

--- NEW FILE file-4.17-init-mem.patch ---
--- file-4.17/src/apprentice.c
+++ file-4.17/src/apprentice.c
@@ -380,8 +380,8 @@ apprentice_file(struct magic_set *ms, st
 		return -1;
 	}
 
-        maxmagic = MAXMAGIS;
-	if ((marray = malloc(maxmagic * sizeof(*marray))) == NULL) {
+	maxmagic = MAXMAGIS;
+	if ((marray = calloc(maxmagic, sizeof(*marray))) == NULL) {
 		(void)fclose(f);
 		file_oomem(ms);
 		return -1;
@@ -509,7 +509,7 @@ parse(struct magic_set *ms, struct magic
 	char *t;
 	private const char *fops = FILE_OPS;
 	uint32_t val;
-	uint32_t cont_level, cont_count;
+	uint32_t cont_level;
 
 	cont_level = 0;
 

file-4.17-mp3_flac.patch:
 audio |   34 +++++++++++++++++++++++++++++++++-
 1 files changed, 33 insertions(+), 1 deletion(-)

--- NEW FILE file-4.17-mp3_flac.patch ---
--- file-4.17/magic/Magdir/audio.mp3	2006-03-02 22:45:25.000000000 +0100
+++ file-4.17/magic/Magdir/audio	2006-03-14 09:28:12.000000000 +0100
@@ -221,9 +221,41 @@
 # SGI SoundTrack <mpruett at sgi.com>
 0	string		_SGI_SoundTrack		SGI SoundTrack project file
 # ID3 version 2 tags <waschk at informatik.uni-rostock.de>
-0	string		ID3	MP3 file with ID3 version 2.
+0      string          ID3     Audio file with ID3 version 2
 >3	ubyte	<0xff	\b%d.
 >4	ubyte	<0xff	\b%d tag
+>2584  string  fLaC            \b, FLAC encoding
+>>2588 byte&0x7f               >0              \b, unknown version
+>>2588 byte&0x7f               0               \b
+# some common bits/sample values
+>>>2600        beshort&0x1f0           0x030           \b, 4 bit
+>>>2600        beshort&0x1f0           0x050           \b, 6 bit
+>>>2600        beshort&0x1f0           0x070           \b, 8 bit
+>>>2600        beshort&0x1f0           0x0b0           \b, 12 bit
+>>>2600        beshort&0x1f0           0x0f0           \b, 16 bit
+>>>2600        beshort&0x1f0           0x170           \b, 24 bit
+>>>2600        byte&0xe                0x0             \b, mono
+>>>2600        byte&0xe                0x2             \b, stereo
+>>>2600        byte&0xe                0x4             \b, 3 channels
+>>>2600        byte&0xe                0x6             \b, 4 channels
+>>>2600        byte&0xe                0x8             \b, 5 channels
+>>>2600        byte&0xe                0xa             \b, 6 channels
+>>>2600        byte&0xe                0xc             \b, 7 channels
+>>>2600        byte&0xe                0xe             \b, 8 channels
+# some common sample rates
+>>>2597        belong&0xfffff0         0x0ac440        \b, 44.1 kHz
+>>>2597        belong&0xfffff0         0x0bb800        \b, 48 kHz
+>>>2597        belong&0xfffff0         0x07d000        \b, 32 kHz
+>>>2597        belong&0xfffff0         0x056220        \b, 22.05 kHz
+>>>2597        belong&0xfffff0         0x05dc00        \b, 24 kHz
+>>>2597        belong&0xfffff0         0x03e800        \b, 16 kHz
+>>>2597        belong&0xfffff0         0x02b110        \b, 11.025 kHz
+>>>2597        belong&0xfffff0         0x02ee00        \b, 12 kHz
+>>>2597        belong&0xfffff0         0x01f400        \b, 8 kHz
+>>>2597        belong&0xfffff0         0x177000        \b, 96 kHz
+>>>2597        belong&0xfffff0         0x0fa000        \b, 64 kHz
+>>>2601        byte&0xf                >0              \b, >4G samples
+>2584  string  !fLaC           \b, MP3 encoding
 
 # NSF (NES sound file) magic
 0	string		NESM\x1a	NES Sound File

file-4.17-wctype-header.patch:
 configure.in |    1 +
 src/funcs.c  |    3 +++
 2 files changed, 4 insertions(+)

--- NEW FILE file-4.17-wctype-header.patch ---
--- file-4.17/configure.in
+++ file-4.17/configure.in
@@ -88,6 +88,7 @@
 AC_CHECK_HEADERS(utime.h)
 AC_CHECK_HEADERS(sys/utime.h)
 AC_CHECK_HEADERS(wchar.h)
+AC_CHECK_HEADERS(wctype.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
--- file-4.17/src/funcs.c
+++ file-4.17/src/funcs.c
@@ -33,6 +33,9 @@
 #if defined(HAVE_WCHAR_H)
 #include <wchar.h>
 #endif
+#if defined(HAVE_WCTYPE_H)
+#include <wctype.h>
+#endif
 
 #ifndef	lint
 FILE_RCSID("@(#)$Id: funcs.c,v 1.19 2006/03/02 22:10:26 christos Exp $")


Index: file.spec
===================================================================
RCS file: /cvs/dist/rpms/file/devel/file.spec,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- file.spec	13 Mar 2006 07:28:43 -0000	1.47
+++ file.spec	14 Mar 2006 08:39:51 -0000	1.48
@@ -3,7 +3,7 @@
 Summary: A utility for determining file types.
 Name: file
 Version: 4.17
-Release: 1
+Release: 2
 License: distributable
 Group: Applications/File
 Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@@ -15,6 +15,9 @@
 Patch6: file-4.13-quick.patch
 Patch8: file-4.15-berkeley.patch
 Patch12: file-4.16-xen.patch
+Patch13: file-4.17-init-mem.patch
+Patch14: file-4.17-wctype-header.patch
+Patch15: file-4.17-mp3_flac.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: zlib-devel
 
@@ -36,6 +39,9 @@
 %patch6 -p1 -b .quick
 %patch8 -p1 -b .berkeley
 %patch12 -p1 -b .xen
+%patch13 -p1 -b .mem
+%patch14 -p1 -b .wctype
+%patch15 -p1 -b .mp3
 
 iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
 mv doc/libmagic.man_ doc/libmagic.man
@@ -81,6 +87,11 @@
 %{_libdir}/libmagic.*
 
 %changelog
+* Tue Mar 14 2006 Radek Vokál <rvokal at redhat.com> 4.17-2
+- fix segfault when compiling magic
+- add check for wctype.h
+- fix for flac and mp3 files
+
 * Mon Mar 13 2006 Radek Vokál <rvokal at redhat.com> 4.17-1
 - upgrade to file-4.17, patch clean-up
 




More information about the fedora-cvs-commits mailing list