Re: cvs: php-src(PHP_5_3) /ext/pdo_sqlite sqlite_statement.c

From: Date: Tue, 19 May 2009 17:04:53 +0000
Subject: Re: cvs: php-src(PHP_5_3) /ext/pdo_sqlite sqlite_statement.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-58018@lists.php.net to get a copy of this message
*len is a pointer to an integer, that is being decremented to reduce the overall length of the string to "remove" the NUL terminator. If you remove the operation you'll end up with 2 NULs at the end of the string. Ilia Alshanetsky On 19-May-09, at 12:58 PM, Matteo Beccati wrote:
Hi Ilia,
+ if (*len) { + /* sqlite3.h says "the NUL terminator is included in the byte count for TEXT values" */ + *len--; /* do not remove this, even though it generates a warning */ + }
Would you mind explaining me why the fix was faulty? Cheers --Matteo Beccati OpenX - http://www.openx.org --PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.cvs (#58018) next »