]>
Commit | Line | Data |
---|---|---|
32f2c205 AM |
1 | commit 19db2c409fce51c612ce673550b186163c6e72d6 |
2 | Author: pajoye <pajoye@c90b9560-bf6c-de11-be94-00142212c4b1> | |
3 | Date: Mon Jun 22 20:42:04 2009 +0000 | |
4 | ||
5 | - MF53: #48619, imap_search ALL segfaults | |
6 | ||
7 | ||
8 | git-svn-id: http://svn.php.net/repository/php/php-src/branches/PHP_5_2@282598 c90b9560-bf6c-de11-be94-00142212c4b1 | |
9 | ||
10 | diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c | |
11 | index ea4e8d5..24111e1 100644 | |
12 | --- a/ext/imap/php_imap.c | |
13 | +++ b/ext/imap/php_imap.c | |
14 | @@ -2670,7 +2670,7 @@ PHP_FUNCTION(imap_sort) | |
15 | ||
16 | slst = mail_sort(imap_le_struct->imap_stream, (myargc == 6 ? Z_STRVAL_PP(charset) : NIL), spg, mypgm, (myargc >= 4 ? Z_LVAL_PP(flags) : NIL)); | |
17 | ||
18 | - if (spg) { | |
19 | + if (spg && !(flags & SE_FREE)) { | |
20 | mail_free_searchpgm(&spg); | |
21 | } | |
22 | ||
23 | @@ -3712,7 +3712,7 @@ PHP_FUNCTION(imap_search) | |
24 | ||
25 | mail_search_full(imap_le_struct->imap_stream, (argc == 4 ? Z_STRVAL_PP(charset) : NIL), pgm, flags); | |
26 | ||
27 | - if (pgm) { | |
28 | + if (pgm && !(flags & SE_FREE)) { | |
29 | mail_free_searchpgm(&pgm); | |
30 | } | |
31 | ||
32 | @@ -4341,7 +4341,7 @@ PHP_FUNCTION(imap_thread) | |
33 | ||
34 | pgm = mail_criteria(criteria); | |
35 | top = mail_thread(imap_le_struct->imap_stream, "REFERENCES", NIL, pgm, flags); | |
36 | - if (pgm) { | |
37 | + if (pgm && !(flags & SE_FREE)) { | |
38 | mail_free_searchpgm(&pgm); | |
39 | } | |
40 | ||
5ebccf0f AM |
41 | commit 069ddaf37eaf2e8f4864b9bbff4cab9174961ffc |
42 | Author: iliaa <iliaa@c90b9560-bf6c-de11-be94-00142212c4b1> | |
43 | Date: Tue Jun 23 12:43:10 2009 +0000 | |
44 | ||
45 | Fixed build | |
46 | ||
47 | ||
48 | git-svn-id: http://svn.php.net/repository/php/php-src/branches/PHP_5_2@282642 c90b9560-bf6c-de11-be94-00142212c4b1 | |
49 | ||
50 | diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c | |
51 | index 24111e1..a5b2dc9 100644 | |
52 | --- a/ext/imap/php_imap.c | |
53 | +++ b/ext/imap/php_imap.c | |
54 | @@ -2670,7 +2670,7 @@ PHP_FUNCTION(imap_sort) | |
55 | ||
56 | slst = mail_sort(imap_le_struct->imap_stream, (myargc == 6 ? Z_STRVAL_PP(charset) : NIL), spg, mypgm, (myargc >= 4 ? Z_LVAL_PP(flags) : NIL)); | |
57 | ||
58 | - if (spg && !(flags & SE_FREE)) { | |
59 | + if (spg && myargc >= 4 && !(Z_LVAL_PP(flags) & SE_FREE)) { | |
60 | mail_free_searchpgm(&spg); | |
61 | } | |
62 |