diff options
author | Anatol Belski <ab@php.net> | 2014-02-20 19:05:59 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-02-20 19:05:59 +0100 |
commit | b67c8b8603f7fa3914f51deefa5a265315179d80 (patch) | |
tree | ac0dd2b6215f03d09c397d748496fd4f7af9fc7d | |
parent | 0746e6af0861c22773aa414bcf6e59877bb7827d (diff) | |
download | php-git-b67c8b8603f7fa3914f51deefa5a265315179d80.tar.gz |
updated libmagic.patch for 5.6+
-rw-r--r-- | ext/fileinfo/libmagic.patch | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/ext/fileinfo/libmagic.patch b/ext/fileinfo/libmagic.patch index 4130b079fd..3fc5b07854 100644 --- a/ext/fileinfo/libmagic.patch +++ b/ext/fileinfo/libmagic.patch @@ -1,6 +1,6 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c --- libmagic.orig/apprentice.c Tue Nov 19 22:01:12 2013 -+++ libmagic/apprentice.c Wed Feb 19 10:56:29 2014 ++++ libmagic/apprentice.c Thu Feb 20 02:06:36 2014 @@ -29,6 +29,8 @@ * apprentice - make one pass through /etc/magic, learning its secrets. */ @@ -798,7 +798,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c } diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c --- libmagic.orig/ascmagic.c Thu Feb 13 00:20:53 2014 -+++ libmagic/ascmagic.c Wed Feb 19 10:10:11 2014 ++++ libmagic/ascmagic.c Thu Feb 20 02:06:36 2014 @@ -139,7 +139,7 @@ /* malloc size is a conservative overestimate; could be improved, or at least realloced after conversion. */ @@ -820,7 +820,7 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c } diff -u libmagic.orig/cdf.c libmagic/cdf.c --- libmagic.orig/cdf.c Tue Feb 26 17:20:42 2013 -+++ libmagic/cdf.c Tue Feb 18 10:59:23 2014 ++++ libmagic/cdf.c Thu Feb 20 02:06:36 2014 @@ -43,7 +43,17 @@ #include <err.h> #endif @@ -883,7 +883,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c } else { diff -u libmagic.orig/cdf.h libmagic/cdf.h --- libmagic.orig/cdf.h Thu Jun 21 00:19:55 2012 -+++ libmagic/cdf.h Tue Feb 18 10:59:23 2014 ++++ libmagic/cdf.h Thu Feb 20 02:06:36 2014 @@ -35,10 +35,12 @@ #ifndef _H_CDF_ #define _H_CDF_ @@ -926,7 +926,7 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h void cdf_unpack_header(cdf_header_t *, char *); diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c --- libmagic.orig/cdf_time.c Thu Jun 21 00:18:33 2012 -+++ libmagic/cdf_time.c Tue Feb 18 10:59:23 2014 ++++ libmagic/cdf_time.c Thu Feb 20 02:06:36 2014 @@ -96,7 +96,7 @@ } @@ -986,7 +986,7 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c static const char *ref = "Sat Apr 23 01:30:00 1977"; diff -u libmagic.orig/compress.c libmagic/compress.c --- libmagic.orig/compress.c Sun Jan 5 16:55:21 2014 -+++ libmagic/compress.c Wed Feb 19 10:10:11 2014 ++++ libmagic/compress.c Thu Feb 20 02:06:36 2014 @@ -32,6 +32,7 @@ * uncompress(method, old, n, newch) - uncompress old into new, * using method, return sizeof new @@ -1149,7 +1149,7 @@ diff -u libmagic.orig/compress.c libmagic/compress.c +#endif /* if PHP_FILEINFO_UNCOMPRESS */ diff -u libmagic.orig/file.h libmagic/file.h --- libmagic.orig/file.h Thu Feb 13 00:20:53 2014 -+++ libmagic/file.h Wed Feb 19 10:10:11 2014 ++++ libmagic/file.h Thu Feb 20 02:06:36 2014 @@ -33,11 +33,9 @@ #ifndef __file_h__ #define __file_h__ @@ -1324,7 +1324,7 @@ diff -u libmagic.orig/file.h libmagic/file.h #endif /* __file_h__ */ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c --- libmagic.orig/fsmagic.c Sun Dec 1 20:22:13 2013 -+++ libmagic/fsmagic.c Wed Feb 19 10:10:11 2014 ++++ libmagic/fsmagic.c Thu Feb 20 02:06:36 2014 @@ -59,27 +59,21 @@ # define minor(dev) ((dev) & 0xff) #endif @@ -1649,7 +1649,7 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c } diff -u libmagic.orig/funcs.c libmagic/funcs.c --- libmagic.orig/funcs.c Thu Feb 13 00:20:53 2014 -+++ libmagic/funcs.c Wed Feb 19 10:10:11 2014 ++++ libmagic/funcs.c Thu Feb 20 02:06:36 2014 @@ -41,79 +41,76 @@ #if defined(HAVE_WCTYPE_H) #include <wctype.h> @@ -1950,7 +1950,7 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c } diff -u libmagic.orig/magic.c libmagic/magic.c --- libmagic.orig/magic.c Sun Dec 1 20:22:13 2013 -+++ libmagic/magic.c Wed Feb 19 10:10:11 2014 ++++ libmagic/magic.c Thu Feb 20 02:06:36 2014 @@ -25,11 +25,6 @@ * SUCH DAMAGE. */ @@ -2289,7 +2289,7 @@ diff -u libmagic.orig/magic.c libmagic/magic.c magic_error(struct magic_set *ms) diff -u libmagic.orig/magic.h libmagic/magic.h --- libmagic.orig/magic.h Wed Feb 19 10:53:11 2014 -+++ libmagic/magic.h Wed Feb 19 10:46:54 2014 ++++ libmagic/magic.h Thu Feb 20 02:06:36 2014 @@ -88,6 +88,7 @@ const char *magic_getpath(const char *, int); @@ -2308,7 +2308,7 @@ diff -u libmagic.orig/magic.h libmagic/magic.h diff -u libmagic.orig/print.c libmagic/print.c --- libmagic.orig/print.c Tue Feb 26 19:25:00 2013 -+++ libmagic/print.c Tue Feb 18 10:59:23 2014 ++++ libmagic/print.c Thu Feb 20 02:06:36 2014 @@ -28,13 +28,17 @@ /* * print.c - debugging printout routines @@ -2539,7 +2539,7 @@ diff -u libmagic.orig/print.c libmagic/print.c } diff -u libmagic.orig/readcdf.c libmagic/readcdf.c --- libmagic.orig/readcdf.c Tue Jan 7 04:13:42 2014 -+++ libmagic/readcdf.c Wed Feb 19 10:10:11 2014 ++++ libmagic/readcdf.c Thu Feb 20 02:06:36 2014 @@ -30,7 +30,11 @@ #endif @@ -2603,7 +2603,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c *ec = '\0'; diff -u libmagic.orig/readelf.c libmagic/readelf.c --- libmagic.orig/readelf.c Tue Nov 5 16:44:01 2013 -+++ libmagic/readelf.c Wed Feb 19 10:10:11 2014 ++++ libmagic/readelf.c Thu Feb 20 02:06:36 2014 @@ -48,8 +48,8 @@ private int dophn_exec(struct magic_set *, int, int, int, off_t, int, size_t, off_t, int *, int); @@ -2827,7 +2827,7 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c if (fstat(fd, &st) == -1) { diff -u libmagic.orig/readelf.h libmagic/readelf.h --- libmagic.orig/readelf.h Tue Nov 5 16:41:56 2013 -+++ libmagic/readelf.h Wed Feb 19 10:10:11 2014 ++++ libmagic/readelf.h Thu Feb 20 02:06:36 2014 @@ -44,9 +44,17 @@ typedef uint32_t Elf32_Word; typedef uint8_t Elf32_Char; @@ -2848,7 +2848,7 @@ diff -u libmagic.orig/readelf.h libmagic/readelf.h typedef uint8_t Elf64_Char; diff -u libmagic.orig/softmagic.c libmagic/softmagic.c --- libmagic.orig/softmagic.c Thu Feb 13 00:20:53 2014 -+++ libmagic/softmagic.c Wed Feb 19 10:10:11 2014 ++++ libmagic/softmagic.c Thu Feb 20 19:03:18 2014 @@ -50,6 +50,11 @@ #include <locale.h> #endif @@ -3003,16 +3003,18 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c } } -@@ -1759,7 +1737,7 @@ +@@ -1759,7 +1737,9 @@ return -1; if (file_printf(ms, "%s", rbuf) == -1) return -1; - free(rbuf); ++ } ++ if (rbuf) { + efree(rbuf); } return rv; -@@ -1875,6 +1853,42 @@ +@@ -1875,6 +1855,42 @@ return file_strncmp(a, b, len, flags); } @@ -3055,7 +3057,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c private int magiccheck(struct magic_set *ms, struct magic *m) { -@@ -2035,63 +2049,151 @@ +@@ -2035,63 +2051,151 @@ break; } case FILE_REGEX: { |