History log of /PHP_5_4/ext/fileinfo/libmagic/apprentice.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2c204a5 31-Mar-2014 Remi Collet <remi@php.net> Fixed Bug #66987 Memory corruption in fileinfo ext (bigendian)

On little endian:
map->p == php_magic_database
map->magic[i] = pointer into the map

map->p == NULL
map->magic[i] = pointer to allocated memory

On big endian (ppc64, s390x, ...):
map->p != php_magic_database and map->p != NULL
map->magic[i] = pointer into a copy of the map

Trying to efree pointer in the later cause memory corruption
Thanks to dkatulek / Red Hat for the report.
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
cdc1a63 27-Apr-2013 Anatol Belski <ab@php.net> Fixed bug bug #64713 Compilation warnings in finfo
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
9de5dca 08-Apr-2013 Anatol Belski <ab@php.net> fix ident
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
f3ca115 08-Apr-2013 Anatol Belski <ab@php.net> Refactored the previous memleak fix

to avoid usage of a freed pointer. Thanks Laruence )
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
28e26b0 07-Apr-2013 Anatol Belski <ab@php.net> fix memory leak at apprentice.c:1095
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
b0b81c0 08-Apr-2013 Anatol Belski <ab@php.net> fixed EOL
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
10367fa 07-Apr-2013 Anatol Belski <ab@php.net> upgraded libmagic to 5.14
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
d88017e 27-Nov-2012 Anatoliy Belsky <ab@php.net> Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
Fixed bug #63590 Fileinfo delivers ifferent results in TS and NTS under Windows

Conflicts:
NEWS
ext/fileinfo/libmagic.patch
ext/fileinfo/tests/finfo_open_error-win32.phpt
e6b727d 27-Nov-2012 Anatoliy Belsky <ab@php.net> Fixed bug #63590 Fileinfo delivers ifferent results in TS and NTS under Windows
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
8a84b1b 23-Nov-2012 Anatoliy Belsky <ab@php.net> Backported the fix for bug #63248 from 5.4+
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
0d7965f 18-Oct-2012 Xinchen Hui <laruence@php.net> Merge the fix for #61964 to 5.3, which will fix #63304
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
6d019de 16-Oct-2012 Anatoliy Belsky <ab@php.net> Fixed bug #63248 Load multiple magic files on win

- adapt config.w32 to not to use dirent lib anymore
- prevent libmagic from opening a dir handle under win
- reimplement the dir iteration functionality with streams
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
328a3d9 11-Sep-2012 Xinchen Hui <laruence@php.net> regenerate patch, and save a strlen
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
0a25a02 10-Sep-2012 Xinchen Hui <laruence@php.net> Fix the wrong use of snprintf which is introduced in 1d2f61904987133d542c68cd349cf313d0bef1c8
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
1d2f619 25-May-2012 Reeze Xia <reeze.xia@gmail.com> Fixed bug #61964 (finfo_open with directory cause invalid free)
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
12cf930 27-Mar-2012 Pierre Joye <pierre.php@gmail.com> Fix bug #61504, potential vuln. in fileinfo. update to 5.11
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
72ad617 22-Nov-2011 Felipe Pena <felipe@php.net> - Fix the fix
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
8a4d75f 22-Nov-2011 Felipe Pena <felipe@php.net> - Fixed possible memory leak in finfo_open()
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
490b75d 27-May-2011 Felipe Pena <felipe@php.net> - Fixed bug #54934 (Unresolved symbol strtoull in HP-UX 11.11)
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
cb30330 26-Apr-2010 Kalle Sommer Nielsen <kalle@php.net> Merge safe_mode changes into extensions that are in sync in both branches
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
0d5a318 27-Dec-2009 Felipe Pena <felipe@php.net> - Fixed ZTS build
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
1e6695f 27-Dec-2009 Mikko Koppanen <mkoppanen@php.net> spprintf the dbname
use VCWD_ACCESS instead of access
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
1496161 26-Dec-2009 Mikko Koppanen <mkoppanen@php.net> Upgrade bundled libmagic to 5.03 (fixes CDF parsing related issues)
Clean up / remove whitespace differences to make next merge easier
Removed unnecessary files from trunk
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
c3b88ae 04-May-2009 Scott MacVicar <scottmac@php.net> MFH Update libmagic to 5.02
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
8e202b4 16-Mar-2009 Pierre Joye <pajoye@php.net> - fix the build for win (vc6 or vc9)
- fix logic in time convertion
- force shared on windows, will fix the dirent issue later (no, it is not enough to simply remove the dep or header include)
- add myself before I forget again
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
7a29c8f 15-Mar-2009 Scott MacVicar <scottmac@php.net> MFH Update fileinfo to libmagic 5.00 and remove dependency on dirent.h on Windows
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
3e543f2 02-Nov-2008 Scott MacVicar <scottmac@php.net> MFH: Sync libmagic with 4.26 and add support for the new v6 magic file format
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
a8c8963 22-Oct-2008 Scott MacVicar <scottmac@php.net> MFH: Fix a stat on a null when the internal database is used.
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
a6ec097 22-Oct-2008 Scott MacVicar <scottmac@php.net> MFH: 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.
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
55a965f 20-Oct-2008 Scott MacVicar <scottmac@php.net> MFH 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.
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
144527b 20-Oct-2008 Pierre Joye <pajoye@php.net> - support for VC6 and some other platforms (before some other cleanup)
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
5a28412 15-Oct-2008 Ilia Alshanetsky <iliaa@php.net> Removed dead-code
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
516ac7e 16-Sep-2008 Felipe Pena <felipe@php.net> - MFH: Fixed bug #46071 (finfo_open() segfaults with wrong file name on BSD)
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
5b0e876 02-Sep-2008 Felipe Pena <felipe@php.net> - Silent valgrind
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
9904116 01-Sep-2008 Pierre Joye <pajoye@php.net> - 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)
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
6fbf14c 29-Aug-2008 Derick Rethans <derick@php.net> - MFH: Some more cleanups, and fixed some warnings.
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
4690692 29-Aug-2008 Scott MacVicar <scottmac@php.net> Replace ereg code with pcre, fix duplicate macro names and segfault. Patch by Mikko
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
b805c7f 26-Aug-2008 Ilia Alshanetsky <iliaa@php.net> 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
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c
7b0f90e 25-Jul-2008 SVN Migration <svn@php.net> This commit was manufactured by cvs2svn to create branch 'PHP_5_3'.
/PHP_5_4/ext/fileinfo/libmagic/apprentice.c