fixed off by one bug in file-4.10
authorNed Ludd <solar@gentoo.org>
Sun, 14 Nov 2004 04:37:24 +0000 (04:37 +0000)
committerNed Ludd <solar@gentoo.org>
Sun, 14 Nov 2004 04:37:24 +0000 (04:37 +0000)
sys-apps/file/ChangeLog
sys-apps/file/Manifest
sys-apps/file/file-4.10-r1.ebuild
sys-apps/file/files/file-4.10-mconvert.patch [new file with mode: 0644]

index 73e36a63f56383c45b731ce69043293e47685bde..de97ad6bd263aa31112da4449e4cc4a032dd4af2 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for sys-apps/file
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.64 2004/11/12 20:10:54 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.65 2004/11/14 04:37:24 solar Exp $
+
+  13 Nov 2004; <solar@gentoo.org> +files/file-4.10-mconvert.patch,
+  file-4.10-r1.ebuild:
+  fixed off by one bug in file-4.10
 
   12 Nov 2004; Gustavo Zacarias <gustavoz@gentoo.org> file-4.10-r1.ebuild:
   Stable on sparc
index 8d4211bc1b20265a9e07736f63f32501477c57fc..b35a9ca1963b8286b97d0d13add9bbfcfd73696b 100644 (file)
@@ -1,11 +1,22 @@
-MD5 09b222fed88036e11b814fee55e9f2ef ChangeLog 8843
-MD5 061925f1389fb03c0e6a2e639eaaf9da file-4.08.ebuild 1425
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 a26ce7962e08d209fccf7669e8e832da file-4.10-r1.ebuild 1909
 MD5 e2d53ae79cd02fc5ddbad4dc8de3f656 file-4.09.ebuild 1903
-MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
 MD5 deefcaad96da75f331ac1ab9d9bc23f9 file-4.10.ebuild 1900
-MD5 397fe1ac24cbad058a03936b3df1d193 file-4.10-r1.ebuild 1866
+MD5 20bab7f04adf55f326d43c38c1ec7d93 ChangeLog 8967
+MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
+MD5 061925f1389fb03c0e6a2e639eaaf9da file-4.08.ebuild 1425
+MD5 8cf0ba615168e0a01ddd576d39b19efe files/digest-file-4.10-r1 61
+MD5 d83caef7e9c2a9719022f57de134edae files/file-4.10-mconvert.patch 476
 MD5 9ab14ea35a2db2864bb6e92d1ca87f17 files/digest-file-4.08 61
 MD5 655e5c463709e244970b23b64aaf8bf7 files/digest-file-4.09 61
-MD5 8f6cec8c0754678a2817139182637eac files/file-4.xx-mips-gentoo.diff 13035
 MD5 8cf0ba615168e0a01ddd576d39b19efe files/digest-file-4.10 61
-MD5 8cf0ba615168e0a01ddd576d39b19efe files/digest-file-4.10-r1 61
+MD5 8f6cec8c0754678a2817139182637eac files/file-4.xx-mips-gentoo.diff 13035
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.2.4 (GNU/Linux)
+
+iD8DBQFBluD494CCfB4KcwwRAgLqAJ4o2p/HTbaVN1IEKldpO70+QZ91WACeKsNb
+CFhW/w64iFMGJtO6Br2tK4M=
+=NdLu
+-----END PGP SIGNATURE-----
index e8bffdb94fcef78de040bb6e2fad58cb736b509c..c5744668add0fc5dfa66ebd502aeec440bd3136c 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/file-4.10-r1.ebuild,v 1.5 2004/11/12 20:10:54 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/file-4.10-r1.ebuild,v 1.6 2004/11/14 04:37:24 solar Exp $
 
 inherit flag-o-matic gnuconfig eutils distutils libtool
 
@@ -21,6 +21,8 @@ src_unpack() {
        unpack ${A}
        cd ${S}
 
+       epatch ${FILESDIR}/file-4.10-mconvert.patch
+
        # (12 Oct 2003) <kumba@gentoo.org>
        # This patch is for MIPS only.  It slightly changes the 'file' output
        # on MIPS machines to a specific format so that other programs can
diff --git a/sys-apps/file/files/file-4.10-mconvert.patch b/sys-apps/file/files/file-4.10-mconvert.patch
new file mode 100644 (file)
index 0000000..9d1a6e1
--- /dev/null
@@ -0,0 +1,18 @@
+--- src/softmagic.c.orig       2004-11-13 03:07:49.000000000 -0500
++++ src/softmagic.c    2004-11-13 03:27:20.000000000 -0500
+@@ -427,12 +427,12 @@ mconvert(struct magic_set *ms, union VAL
+               return 1;
+       case FILE_STRING:
+               {
+-                      int n;
++                      size_t n;
+ 
+                       /* Null terminate and eat *trailing* return */
+                       p->s[sizeof(p->s) - 1] = '\0';
+-                      n = strlen(p->s) - 1;
+-                      if (p->s[n] == '\n')
++                      n = strlen(p->s);
++                      if (n-- && p->s[n] == '\n')
+                               p->s[n] = '\0';
+                       return 1;
+               }