iliaa Sun Dec 24 20:50:21 2006 UTC Modified files: /php-src/ext/sqlite/libsqlite/src encode.c Log: MFB: Added empty string checks http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite/libsqlite/src/encode.c?r1=1.6&r2=1.7&diff_format=u Index: php-src/ext/sqlite/libsqlite/src/encode.c diff -u php-src/ext/sqlite/libsqlite/src/encode.c:1.6 php-src/ext/sqlite/libsqlite/src/encode.c:1.7 --- php-src/ext/sqlite/libsqlite/src/encode.c:1.6 Wed Sep 7 15:10:09 2005 +++ php-src/ext/sqlite/libsqlite/src/encode.c Sun Dec 24 20:50:21 2006 @@ -15,7 +15,7 @@ ** data in an SQLite database. The code in this file is not used by any other ** part of the SQLite library. ** -** $Id: encode.c,v 1.6 2005/09/07 15:10:09 iliaa Exp $ +** $Id: encode.c,v 1.7 2006/12/24 20:50:21 iliaa Exp $ */ #include <string.h> #include <assert.h> @@ -176,9 +176,12 @@ int i, e; unsigned char c; e = *(in++); + if (e == 0) { + return 0; + } i = 0; while( (c = *(in++))!=0 ){ - if( c==1 ){ + if (c == 1) { c = *(in++) - 1; } out[i++] = c + e;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php