Re: cvs: php-src(PHP_5_2) /ext/imap php_imap.c

From: Date: Fri, 16 Feb 2007 10:15:30 +0000
Subject: Re: cvs: php-src(PHP_5_2) /ext/imap php_imap.c
References: 1 2 3 4  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-43088@lists.php.net to get a copy of this message
On 2/16/07, Antony Dovgal <antony@zend.com> 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


« previous php.cvs (#43088) next »