119 Commits

Author SHA1 Message Date
Remi Collet
f4c9d92c90 Fix memory leak 2025-09-29 16:03:55 +02:00
Remi Collet
80133bc2d4 Fix #27 MimeMessage::__construct() throws TypeError with $mode=stream 2023-06-12 14:15:34 +02:00
Remi Collet
59e040beac fix regression for PHP < 8.1 2023-05-30 15:39:31 +02:00
Remi Collet
a0d99d6372 drop usage of removed mbfl APIs in PHP 8.3 2023-05-30 15:22:05 +02:00
Remi Collet
f8d4e40474 clean up pre 7.3 compat 2022-09-15 13:34:14 +02:00
Remi Collet
e633e2308a declare mimemessage::data property (for 8.2) 2022-05-24 16:16:44 +02:00
Remi Collet
3680710631 simplify php_stream_memory_get_buffer calls 2022-02-21 11:16:10 +01:00
Remi Collet
c53ff56254 fix more php_stream_memory_get_buffer calls 2022-02-21 10:36:52 +01:00
Remi Collet
dca513d187 Fix gh#19 Segmentation fault with PHP 8.1 in extract_body using MAILPARSE_EXTRACT_RETURN 2022-02-21 10:20:44 +01:00
Christoph M. Becker
bca9ef964c Fix #75825: mailparse_uudecode_all doesn't parse multiple files
As is, multiple uuencoded files needs to be separated by at least one
blank line.  This restriction appears to be somewhat arbitrary, since
the end of each file is already signaled by the sequence of a line with
a backtick only, followed by a line with the word "end" only. Thus, we
lift this restriction.

Closes GH-16.
2021-09-20 10:06:59 +02:00
Christoph M. Becker
7fe7a0316f Fix #81422: Potential double-free in mailparse_uudecode_all()
We must not release the outpath multiple times.  We also make sure that
we only release the outpath of the part files, if the stream had been
opened successfully.

Closes GH-17.
2021-09-07 12:20:00 +02:00
Remi Collet
ae960dba8c fix for 8.1 2021-06-08 08:00:37 +02:00
Remi Collet
06c996f4df mbfl_convert_filter_feed is back in 8.0.0beta4 2020-09-15 15:16:03 +02:00
Christoph M. Becker
29ed243830 Fix #76498: Unable to use callable as callback
We implement general support for callables.
2020-09-15 12:54:52 +02:00
Remi Collet
fa3c4f0c32 mbfl_convert_filter_feed removed in 8.0.0beta3 2020-09-02 11:53:27 +02:00
Remi Collet
b227b6b432 Release 3.1.0 2020-04-22 09:12:12 +02:00
Remi Collet
4f4948189e fix MimeMessage constructor name 2020-04-21 17:22:27 +02:00
Remi Collet
26f4f08f28 add arginfo to all functions 2020-04-10 15:33:34 +02:00
Christoph M. Becker
9efc0652bd Replace ulong with zend_ulong
`ulong` is no longer supported on Windows as of PHP 7.4.0, so we
replace it with the more suitable `zend_ulong`, and fix the format
specifier right away.
2019-11-27 15:58:26 +01:00
Remi Collet
8b2be92eb9 clean 2019-03-13 13:43:36 +01:00
Remi Collet
7df6d614e7 fix segfault, thanks cmb 2018-12-19 14:30:30 +01:00
Remi Collet
132cb492bf simplify, array_init always succeed 2018-07-12 14:20:54 +02:00
Remi Collet
449215fd2b use proper macro 2018-07-11 11:43:58 +02:00
Jan-E
4825a05d76 Move zend_string_init to the top of the block 2018-07-11 11:40:11 +02:00
Jan-E
13c2c425e5 PHP 7.3 compatibility 2018-07-11 11:40:11 +02:00
Remi Collet
720ed5b775 add dependency on mbstring extension 2018-07-11 11:26:35 +02:00
Remi Collet
385763b215 cleanup headers 2018-07-11 08:11:09 +02:00
Remi Collet
710cc7f02a fix -Wformat warning 2018-07-10 15:53:10 +02:00
Sean DuBois
374a940991 Fix get_child, when ported to PHP 7 String/Long juggling as the type was not properly converted. 2016-06-19 01:38:38 -05:00
Sean DuBois
f2b4423474 zend_list_delete -> zend_list_close 2016-01-28 16:02:27 +00:00
Sean DuBois
6b8481f9a5 Use ZSTR macros instead of accessing val/len directly 2015-12-08 00:16:57 +00:00
Sean DuBois
d9763d6db2 Fix last memory leaks in test suite 2015-12-08 00:16:57 +00:00
Sean DuBois
943e46fb17 Fix issues found in code review by @laruence, thanks 2015-12-08 00:16:52 +00:00
Sean DuBois
a4aa06d59c Remove all TSRM calls, fix uses of zend_parse_paramaters with the incorrect type 2015-12-07 18:24:50 +00:00
Sean DuBois
1bda7ccaec Fixing Tests: tests/parse_test_messages.phpt now passes. All tests now pass. 2015-12-07 06:10:21 +00:00
Sean DuBois
0492bbaa12 Fix memory leaks and zval_copy_ctor -> ZVAL_DUP 2015-12-07 06:10:21 +00:00
Sean DuBois
92836fb9c4 Fix zend_string leaks 2015-12-07 06:10:21 +00:00
Sean DuBois
a04965b677 Cleanup final TODO items 2015-12-07 06:10:21 +00:00
Sean DuBois
0207073f0d Instead of incorretly storing (php_mimepart *) in the _php_mimepart->children HashTable store zval of type ref pointing to them 2015-12-07 06:10:21 +00:00
Sean DuBois
2c579cd712 Fixing Tests: tests/006.phpt now passes 2015-12-07 06:10:21 +00:00
Sean DuBois
e29da7c030 Fixing Tests: tests/009.phpt now passes 2015-12-07 06:10:21 +00:00
Sean DuBois
76e65803eb Fixing Tests: tests/008.phpt now passes 2015-12-07 06:10:21 +00:00
Sean DuBois
43f8f1519c Fixing Tests: tests/004.phpt now passes, mailparse_rfc822_parse_addresses now uses a zend_string instead of char+int 2015-12-07 06:10:21 +00:00
Sean DuBois
07464a0870 Fixing Tests: tests/004.phpt now passes 2015-12-07 06:10:21 +00:00
Sean DuBois
fe18019c99 Fixing Tests: tests/003.phpt now passes 2015-12-07 06:10:21 +00:00
Sean DuBois
afd1d6616d Fix compile errors in php_mailparse_mime.c 2015-12-07 06:10:21 +00:00
Sean DuBois
4ffd793362 Convert ZEND_FETCH_RESOURCE calls to zend_fetch_resource 2015-12-07 06:10:21 +00:00
Sean DuBois
ad6d11b47d Fix compile errors in mailparse.c, many called functions are broken and still need to be fixed 2015-12-07 06:10:21 +00:00
Remi Collet
d79a9ecc8a update license version 2015-04-06 06:11:11 +00:00
Remi Collet
a5e07cb35f fix svn attributes 2015-04-05 08:03:36 +00:00