1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 08:28:26 +02:00
Commit Graph

102 Commits

Author SHA1 Message Date
Pierre Joye b72606c92f - 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
2009-03-16 15:02:44 +00:00
Ilia Alshanetsky 52ffe21fdc MFB: Fixed compiler warnings 2009-03-16 12:52:59 +00:00
Scott MacVicar 0ac605c41b fileinfo tests are missing skipif 2009-03-15 23:16:55 +00:00
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
Marcus Boerger d4f5b3f0a9 - This is PHP 6 - if this ... ever gets out 2009-03-10 23:40:06 +00:00
Andrei Zmievski e1ee6322bb MFB 2009-01-12 19:15:07 +00:00
Scott MacVicar 67e6af2b91 Remove all of the stuff we have in here for pre PHP 5.2 support and memset the fileinfo struct. 2008-12-22 16:44:51 +00:00
Derick Rethans 308d4fa79a *** empty log message *** 2008-12-04 14:53:51 +00:00
Scott MacVicar 36660c01ab Add asprintf, use regular system malloc and free and add checks in configure.in for the functions 2008-11-27 19:45:16 +00:00
Scott MacVicar a064b61971 Warnings from libmagic should be notices rather than sent to stderr, this fixes a test on Windows 2008-11-22 10:27:19 +00:00
Felipe Pena 43791516db - Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro (again!) 2008-11-17 11:26:25 +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 ca77d8ae31 Fix buffer overread in libmagic and sync a skipped change from 4.26 2008-11-06 02:58:14 +00:00
Felipe Pena e006a89e71 - Revert ZEND_BEGIN_ARG_INFO change 2008-11-02 21:10:13 +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
Felipe Pena 7eb2715464 - Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro 2008-10-24 14:34:17 +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
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