Commit Graph

80 Commits

Author SHA1 Message Date
Derick Rethans
194577d7a6 - Fixed mime-type generation.
#- Charset markers need to be prepended with ; -- the tests were also wrong.
2008-10-08 09:44:12 +00:00
Felipe Pena
4fc7e69dd5 - Fixed bug #46071 (finfo_open() segfaults with wrong file name on BSD) 2008-09-16 22:21:40 +00:00
Antony Dovgal
07aac764a5 fix compile warning 2008-09-16 09:48:07 +00:00
Scott MacVicar
355c6d4226 Fix memory leak in a few cases 2008-09-16 09:45:06 +00:00
Scott MacVicar
71d0a46269 MFB Fixed bug #46086 (Segfault when accessing fileinfo class property) 2008-09-15 22:15:16 +00:00
Felix De Vliegher
c8ff440095 More fileinfo tests 2008-09-15 08:42:48 +00:00
Antony Dovgal
43034db4c1 actually reset stream position when finished 2008-09-13 21:32:15 +00:00
Felipe Pena
ac3ae236ec - MFB:
- use php's stream in libmagic
  - remove duplicate code (like mime_content_type() compatibility function
    now use the same base as finfo_file())
  - make it portable (works now on windows too, belongs other OSes)

  - don't close caller streams in libmagic (prevent leak and zombie stream)
  - string returned by magic_* are freed on magic_close, duplicate before
    calling magic_close (set return value)
  - if stat failed, don't try to call magic_* (when FILEINFO_MODE_FILE)
2008-09-07 20:29:54 +00:00
Felipe Pena
6051053c58 - Fix build 2008-09-07 04:17:22 +00:00
Ilia Alshanetsky
7a6170b389 MFB: removed unused variables 2008-09-06 21:32:32 +00:00
Felipe Pena
ec949e90ce - New test 2008-09-02 19:27:32 +00:00
Felipe Pena
df8cce7248 - New test 2008-09-01 23:41:34 +00:00
Felipe Pena
66019ba30c - Fixed tests (Disable COMPRESS support for now) 2008-08-29 15:29:02 +00:00
Felipe Pena
091ef5362f - Fixed build 2008-08-29 15:17:25 +00:00
Antony Dovgal
674a7de88a check for \0 to be consistent with other functions 2008-08-29 13:48:26 +00:00
Derick Rethans
6152e055b6 - MFB: Disable COMPRESS support for now, as it requires forking.
# @DOC [DOC] "DOC"
2008-08-29 13:39:17 +00:00
Derick Rethans
58a04c4494 - Adding back in mime_content_type(). 2008-08-29 13:29:18 +00:00
Derick Rethans
07633881bd - Some more cleanups, and fixed some warnings. 2008-08-29 12:05:35 +00:00
Antony Dovgal
914f8ceb09 fix invalid read
weird, the code uses correct order of checks just ten lines below
2008-08-29 10:53:07 +00:00
Felix De Vliegher
872257f7cc MFB: Some fileinfo tests 2008-08-29 10:34:34 +00:00
Antony Dovgal
2fbc38c67e fix ZTS build 2008-08-29 10:10:56 +00:00
Antony Dovgal
f6b3447c34 fix build 2008-08-29 10:08:30 +00:00
Scott MacVicar
808041719d MFB: Test for fileinfo to check mime types. 2008-08-29 09:55:52 +00:00
Scott MacVicar
83abc6c537 MFB: Replace ereg code with pcre, fix duplicate macro names and segfault. Patch by Mikko 2008-08-29 09:50:57 +00:00
Antony Dovgal
f0d93b2a07 fix file check and avoid segfault 2008-08-27 07:40:59 +00:00
Felipe Pena
ea5d69120d - Fixed check for empty file name 2008-08-27 01:02:58 +00:00
Felipe Pena
4eaaf7be83 - Fixed crash in file_error_core() 2008-08-27 00:16:11 +00:00
Felipe Pena
2058709940 - Improved fix 2008-08-26 16:19:29 +00:00
Felipe Pena
3ade387884 - Added check for empty file name 2008-08-26 15:03:33 +00:00
Ilia Alshanetsky
caa3217c68 MFB:
Upgraded the lib to use PHP memory allocation routines.
	Fixed a crash caused by analysis of DEADJOE files
	A little bit of CS inside libmagic
2008-08-26 12:24:12 +00:00
Antony Dovgal
6dca1deb52 fix compilation on AIX 2008-08-10 19:48:48 +00:00
Derick Rethans
7b759c4eb3 - Fixed bug #45636 (fileinfo ext duplicate strndup). 2008-08-06 14:42:06 +00:00
Derick Rethans
2db85e29ac - Fixed bug #45717 (Fileinfo/libmagic build fails, missing err.h and getopt.h). 2008-08-06 14:29:27 +00:00
Pierre Joye
f3c5be8d13 - MFB: update config to match config.m4
(still does not build but will be fixed for alpha2)
2008-07-31 13:14:22 +00:00
Scott MacVicar
0b88f59125 get fileinfo building again on Windows 2008-07-31 00:32:25 +00:00
Felipe Pena
f074bae1ea - Added arginfo
- Fixed:
  . proto: finfo_buffer
  . parameter type in _php_finfo_get_type()
2008-07-25 15:20:58 +00:00
Felipe Pena
5d1a2c3317 - Fix build 2008-07-25 11:54:06 +00:00
Jani Taskinen
419a40f14a - Enable fileinfo by default 2008-07-25 09:16:09 +00:00
Derick Rethans
0192c570c8 - No C++ comments. 2008-07-25 08:18:34 +00:00
Derick Rethans
1fdbee278a - Updating the libmagic patch.
- Adding myself to credits.
2008-07-25 08:17:21 +00:00
Derick Rethans
1371ec3fbf - Fixed size calculation.
- Reverted cosmetic fixes that makes upgrading harder.
2008-07-25 08:16:03 +00:00
Antony Dovgal
1133a7c224 use "r" instead of "z" when accepting resources 2008-07-24 15:07:37 +00:00
Antony Dovgal
231bafaade we don't do fstat, hence st struct is uninitalized 2008-07-24 14:53:59 +00:00
Antony Dovgal
54e1d048cd silence compile warning 2008-07-24 14:45:53 +00:00
Antony Dovgal
8e24e64882 fix folding 2008-07-24 14:44:15 +00:00
Antony Dovgal
29bb0c9dd3 drop freeing of uninitialized variable
add missing return
nuke unused variable
2008-07-24 14:30:58 +00:00
Antony Dovgal
77149f12d1 do not include libmagic/file.c into the build 2008-07-24 14:22:30 +00:00
Derick Rethans
8c8b504bc4 - Bundle the data file - you can still use the external file if you
specify that in the call to finfo_open().
2008-07-24 13:40:21 +00:00
Jani Taskinen
f58f634618 - Enable bundled library 2008-07-11 14:49:45 +00:00
Derick Rethans
74947e562e - Move lib to libmagic 2008-07-11 14:13:50 +00:00