Commit Graph

249 Commits

Author SHA1 Message Date
Pierre Joye
c8a0c3b0f5 - 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-02 10:15:54 +00:00
Felipe Pena
d13b704d25 - Fixed mime_content_type() behavior when a string is given
- Fixed check for "empty file name"
- MFH: New test
2008-09-01 23:44:00 +00:00
Pierre Joye
99041160df - 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)

- ([20:28]  <lsmith> Pierre: ok please commit)
2008-09-01 18:56:06 +00:00
Felipe Pena
9566ebabcb - Fixed tests (Disable COMPRESS support for now) 2008-08-29 15:28:45 +00:00
Antony Dovgal
fa978e8595 MFH: check for \0 to be consistent with other functions 2008-08-29 13:48:38 +00:00
Derick Rethans
057b2401bf - Disable COMPRESS support for now, as it requires forking.
# @DOC [DOC] "DOC"
2008-08-29 13:39:01 +00:00
Derick Rethans
4ca7e129a7 - MFH: Adding back in mime_content_type(). 2008-08-29 13:29:42 +00:00
Derick Rethans
6fbf14c544 - MFH: Some more cleanups, and fixed some warnings. 2008-08-29 12:05:46 +00:00
Antony Dovgal
c7c4d96c73 fix invalid read 2008-08-29 10:53:13 +00:00
Felix De Vliegher
ef8ae4dfc5 Some fileinfo tests 2008-08-29 10:29:55 +00:00
Antony Dovgal
f6e15a25da fix ZTS build 2008-08-29 10:12:29 +00:00
Scott MacVicar
907c24fd81 Test for fileinfo to check mime types. 2008-08-29 09:52:13 +00:00
Scott MacVicar
4690692519 Replace ereg code with pcre, fix duplicate macro names and segfault. Patch by Mikko 2008-08-29 09:49:01 +00:00
Antony Dovgal
3bd40d9000 fix file check and avoid segfault 2008-08-27 07:40:44 +00:00
Felipe Pena
7208556ca4 - MFH: Fixed check for empty file name 2008-08-27 01:04:23 +00:00
Felipe Pena
1ef7dfce3d - MFH: Fixed crash in file_error_core() 2008-08-27 00:17:27 +00:00
Felipe Pena
d8c43bde79 - MFH: Improved fix 2008-08-26 16:22:27 +00:00
Felipe Pena
727990f432 - MFH: Added check for empty file name 2008-08-26 15:06:28 +00:00
Ilia Alshanetsky
b805c7f8b7 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:23:29 +00:00
Antony Dovgal
273ebb45c9 MFH 2008-08-10 19:48:54 +00:00
Derick Rethans
3cb1759e08 - MFH: Fixed bug #45636 (fileinfo ext duplicate strndup). 2008-08-06 14:42:38 +00:00
Derick Rethans
8c1e71ff83 - MFH: Fixed bug #45717 (Fileinfo/libmagic build fails, missing err.h and
getopt.h).
2008-08-06 14:30:04 +00:00
Pierre Joye
c71b745655 - update config to match config.m4
(still does not build but will be fixed for alpha2)
2008-07-31 13:13:20 +00:00
Scott MacVicar
97400c6cd3 MFH: get fileinfo building again on Windows 2008-07-31 00:33:02 +00:00
Felipe Pena
8085094da8 MFH:
- Added arginfo
- Fixed:
  . proto: finfo_buffer
  . parameter type in _php_finfo_get_type()
2008-07-25 15:23:10 +00:00
Jani Taskinen
ccc012d3f6 MFH: enable fileinfo by default 2008-07-25 09:16:22 +00:00
SVN Migration
7b0f90e0c8 This commit was manufactured by cvs2svn to create branch 'PHP_5_3'. 2008-07-25 08:18:35 +00:00
SVN Migration
14ce4a1d0a This commit was manufactured by cvs2svn to create branch 'PHP_5_3'. 2008-07-25 02:44:58 +00:00
SVN Migration
16b4d8e0e1 This commit was manufactured by cvs2svn to create branch 'PHP_5_3'. 2008-05-12 21:03:49 +00:00
SVN Migration
0e5d551a56 This commit was manufactured by cvs2svn to create branch 'PHP_5_3'. 2007-09-26 15:44:16 +00:00
SVN Migration
4571221d8e This commit was manufactured by cvs2svn to create branch 'PHP_5_1'. 2005-08-08 23:59:05 +00:00
Ilia Alshanetsky
2e79463120 Release news 2005-06-30 21:13:34 +00:00
Ilia Alshanetsky
21e17d7ec0 Final (i hope) set of magic.h detection fixes. 2005-06-29 15:57:16 +00:00
Ilia Alshanetsky
7022fbae55 More reliable library detection.
# Thanks Jani
2005-06-29 13:53:59 +00:00
Ilia Alshanetsky
6f13b138a7 Added another search patch for magic file (fixes bug #3232). 2005-04-05 15:12:52 +00:00
Ilia Alshanetsky
6af3197b90 Improved search paths. 2005-02-17 22:56:47 +00:00
Antony Dovgal
5e8cd3a2da fix segfault when failed to open magic file 2005-01-31 15:01:47 +00:00
Ilia Alshanetsky
25fd4c3bc2 Fixed ZTS build 2005-01-24 23:53:00 +00:00
Ilia Alshanetsky
3849411fa2 Adjust magic path ordering. 2004-08-20 15:11:49 +00:00
Ilia Alshanetsky
420a8cd50a Added /usr/share/misc/file/magic to the possible magic paths (used by Debian) 2004-08-20 13:48:19 +00:00
Ilia Alshanetsky
b59d5af951 Prepare for 0.2 release. 2004-05-26 20:25:58 +00:00
Ilia Alshanetsky
28eaa612c1 Fixed typo. 2004-05-08 17:37:28 +00:00
Derick Rethans
f7afbb9370 - Fixed type which prevented this extension from being loaded as shared
extension.
2004-05-08 17:34:07 +00:00
Ilia Alshanetsky
d641ba3eae More C++ comments. 2004-04-21 23:16:34 +00:00
Ilia Alshanetsky
1b80b33b87 C++ comments are ungood ;). 2004-04-21 23:06:26 +00:00
Hartmut Holzgraefe
375b5df63d libmagic will only consume up to HOWMANY (hardcoded to 65536) bytes
from a file, so lets save bandwith and memory by limiting us to this
2004-04-21 22:49:35 +00:00
Ilia Alshanetsky
5a38078385 Fixes for PHP 4.3.X. 2004-02-13 01:19:57 +00:00
Ilia Alshanetsky
b93acb023d Added package.xml 2004-02-13 01:14:15 +00:00
Ilia Alshanetsky
eb06e0c425 Initial commit of the fileinfo extension. 2004-02-13 01:06:06 +00:00