Scott MacVicar
daf4211e0b
Update fileinfo to libmagic 5.00 and remove dependency on dirent.h on Windows
2009-03-15 23:02:35 +00:00
Pierre Joye
18c13084c7
- MFB: fix VC6 build, use our own strtoi64 implementation for VC6
2008-11-07 13:12:13 +00:00
Pierre Joye
36b3f02c19
- fix build
2008-11-06 14:24:24 +00:00
Pierre Joye
510d80e388
- MFH
...
- add 64bit typedef support
- fix vc6 build (1/2)
- still broken/does not build cleanly, more to come
2008-11-06 13:56:49 +00:00
Scott MacVicar
881c30db88
Update libmagic to 4.26 and add support for v6 of the magic file format.
2008-11-02 16:09:27 +00:00
Scott MacVicar
6978fff657
Fix a stat on a null when the internal database is used.
2008-10-22 16:34:17 +00:00
Scott MacVicar
be09b491da
When using the internal database and there is an error it could try free some invalid things. This was causing a bus error on ppc.
2008-10-22 13:59:08 +00:00
Scott MacVicar
df2b71d2ca
Fix bug #46331 - The internal magic db is const memory and segfaults when you try to do byte swapping
...
on big endian machines. This fixes it by copying the memory for those processors, but this isn't ideal as
it wastes memory. Perhaps using a static cache would be better.
2008-10-20 23:35:47 +00:00
Ilia Alshanetsky
9219be30f4
MFB: removed dead-code
2008-10-15 22:57:22 +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
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
Derick Rethans
07633881bd
- Some more cleanups, and fixed some warnings.
2008-08-29 12:05:35 +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
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
Derick Rethans
0192c570c8
- No C++ comments.
2008-07-25 08:18:34 +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
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
29bb0c9dd3
drop freeing of uninitialized variable
...
add missing return
nuke unused variable
2008-07-24 14:30:58 +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
Derick Rethans
74947e562e
- Move lib to libmagic
2008-07-11 14:13:50 +00:00