summaryrefslogtreecommitdiff
path: root/ext/fileinfo/libmagic
diff options
context:
space:
mode:
authorThijs Kinkhorst <thijs@debian.org>2014-10-15 13:17:14 +0000
committerThijs Kinkhorst <thijs@debian.org>2014-10-15 13:17:14 +0000
commit04b664c46aafc46bb3030d3bf06eb5f0b38c2b49 (patch)
tree07e2dbf984b126837bfc6c20e0a025c754ade299 /ext/fileinfo/libmagic
parentd73ee84cfbc86e793602b826adb0dd6bce042838 (diff)
downloadphp-04b664c46aafc46bb3030d3bf06eb5f0b38c2b49.tar.gz
Imported Upstream version 5.6.1+dfsgupstream/5.6.1+dfsg
Diffstat (limited to 'ext/fileinfo/libmagic')
-rw-r--r--ext/fileinfo/libmagic/funcs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/fileinfo/libmagic/funcs.c b/ext/fileinfo/libmagic/funcs.c
index e1aa7b9c3..bd6d3d592 100644
--- a/ext/fileinfo/libmagic/funcs.c
+++ b/ext/fileinfo/libmagic/funcs.c
@@ -27,7 +27,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: funcs.c,v 1.67 2014/02/12 23:20:53 christos Exp $")
+FILE_RCSID("@(#)$File: funcs.c,v 1.68 2014/02/18 11:09:31 kim Exp $")
#endif /* lint */
#include "magic.h"
@@ -173,8 +173,7 @@ file_buffer(struct magic_set *ms, php_stream *stream, const char *inname, const
const char *code_mime = "binary";
const char *type = "application/octet-stream";
const char *def = "data";
-
-
+ const char *ftype = NULL;
if (nb == 0) {
def = "empty";
@@ -187,7 +186,7 @@ file_buffer(struct magic_set *ms, php_stream *stream, const char *inname, const
if ((ms->flags & MAGIC_NO_CHECK_ENCODING) == 0) {
looks_text = file_encoding(ms, ubuf, nb, &u8buf, &ulen,
- &code, &code_mime, &type);
+ &code, &code_mime, &ftype);
}
#ifdef __EMX__
@@ -272,7 +271,7 @@ file_buffer(struct magic_set *ms, php_stream *stream, const char *inname, const
if ((ms->flags & MAGIC_NO_CHECK_ENCODING) == 0) {
if (looks_text == 0)
if ((m = file_ascmagic_with_encoding( ms, ubuf,
- nb, u8buf, ulen, code, type, looks_text))
+ nb, u8buf, ulen, code, ftype, looks_text))
!= 0) {
if ((ms->flags & MAGIC_DEBUG) != 0)
(void)fprintf(stderr,