+++ /dev/null
---- file-3.37/magic/magic.mime.orig 2002-04-24 13:05:20.000000000 -0300
-+++ file-3.37/magic/magic.mime 2002-04-24 13:06:18.000000000 -0300
-@@ -517,13 +517,24 @@
- >4 byte 0
- >4 byte 1
- >4 byte 2
-+# offset 5: data encoding:
-+# invalid data encoding
- >5 byte 0
-+# little endian
- >5 byte 1
- >>16 leshort 0
- >>16 leshort 1 application/x-object
- >>16 leshort 2 application/x-executable
- >>16 leshort 3 application/x-sharedlib
- >>16 leshort 4 application/x-coredump
-+# big endian:
-+>5 byte 2
-+>>16 beshort 0
-+>>16 beshort 1 application/x-object
-+>>16 beshort 2 application/x-executable
-+>>16 beshort 3 application/x-sharedlib
-+>>16 beshort 4 application/x-coredump
-+
- #
- # DOS
- 0 string MZ application/x-dosexec
+++ /dev/null
---- file-4.10/src/readelf.c.orig 2004-07-24 22:57:22.000000000 +0200
-+++ file-4.10/src/readelf.c 2004-07-26 22:04:48.734248992 +0200
-@@ -256,7 +256,7 @@
- file_badseek(ms);
- return -1;
- }
-- bufsize = read(fd, nbuf, sizeof(nbuf));
-+ bufsize = read(fd, nbuf, ((ph_filesz < sizeof(nbuf)) ? ph_filesz : sizeof(nbuf)));
- if (bufsize == -1) {
- file_badread(ms);
- return -1;
-@@ -327,7 +327,7 @@
- }
-
- offset = ELF_ALIGN(doff + descsz);
-- if (offset + descsz > size) {
-+ if (doff + descsz > size) {
- return offset;
- }
-
-@@ -693,7 +693,8 @@
- file_badseek(ms);
- return -1;
- }
-- bufsize = read(fd, nbuf, sizeof(nbuf));
-+ bufsize = read(fd, nbuf,
-+ ((ph_filesz < sizeof(nbuf)) ? ph_filesz : sizeof(nbuf)));
- if (bufsize == -1) {
- file_badread(ms);
- return -1;
+++ /dev/null
---- file-4.11/src/softmagic.c.orig 2004-11-21 07:09:43.000000000 +0100
-+++ file-4.11/src/softmagic.c 2004-11-23 14:28:50.000000000 +0100
-@@ -663,7 +663,7 @@
- * might even cause problems
- */
- if (nbytes < sizeof(*p))
-- (void)memset(p + nbytes, '\0', sizeof(*p) - nbytes);
-+ (void)memset(((char *)p) + nbytes, '\0', sizeof(*p) - nbytes);
- return 0;
- }
-