On 2/16/07, Antony Dovgal <[EMAIL PROTECTED]> wrote:
On 02/16/2007 05:04 AM, Ilia Alshanetsky wrote:
> What version of c-client are you using? For me here the code does not
> show any errors via valgrind 3.2.3.

It's quite old, yes - imap-2004c.
imap-2006d works ok in the same time.

Ok, I found a solution, this patch fixes it:

Yup. Fixes it for my "good old" cclient-2004g too

-Hannes

Index: ext/imap/php_imap.c
===================================================================
RCS file: /repository/php-src/ext/imap/php_imap.c,v
retrieving revision 1.208.2.7.2.17
diff -u -p -d -r1.208.2.7.2.17 php_imap.c
--- ext/imap/php_imap.c 13 Feb 2007 20:12:52 -0000      1.208.2.7.2.17
+++ ext/imap/php_imap.c 16 Feb 2007 07:04:00 -0000
@@ -2215,7 +2215,7 @@ PHP_FUNCTION(imap_utf8)
        if (dest.data) {
                free(dest.data);
        }
-       if (src.data) {
+       if (src.data && src.data != dest.data) {
                free(src.data);
        }
 }


In c-client sources they use similar if's.

--
Wbr,
Antony Dovgal

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to