iliaa Sun Mar 7 16:57:51 2004 EDT Modified files: /php-src/ext/sqlite sess_sqlite.c sqlite.c Log: Corrected string escape calculation. http://cvs.php.net/diff.php/php-src/ext/sqlite/sess_sqlite.c?r1=1.14&r2=1.15&ty=u Index: php-src/ext/sqlite/sess_sqlite.c diff -u php-src/ext/sqlite/sess_sqlite.c:1.14 php-src/ext/sqlite/sess_sqlite.c:1.15 --- php-src/ext/sqlite/sess_sqlite.c:1.14 Sat Mar 6 13:11:59 2004 +++ php-src/ext/sqlite/sess_sqlite.c Sun Mar 7 16:57:50 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sess_sqlite.c,v 1.14 2004/03/06 18:11:59 iliaa Exp $ */ +/* $Id: sess_sqlite.c,v 1.15 2004/03/07 21:57:50 iliaa Exp $ */ #include "php.h" @@ -142,7 +142,7 @@ t = time(NULL); - binary = emalloc(1 + 5 + vallen * (256 / 253)); + binary = emalloc(1 + 5 + vallen * ((float) 256 / (float) 253)); binlen = sqlite_encode_binary((const unsigned char*)val, vallen, binary); rv = sqlite_exec_printf(db, "REPLACE INTO session_data VALUES('%q', '%q', %d)", NULL, NULL, &error, key, binary, t); http://cvs.php.net/diff.php/php-src/ext/sqlite/sqlite.c?r1=1.128&r2=1.129&ty=u Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.128 php-src/ext/sqlite/sqlite.c:1.129 --- php-src/ext/sqlite/sqlite.c:1.128 Sat Mar 6 13:29:54 2004 +++ php-src/ext/sqlite/sqlite.c Sun Mar 7 16:57:50 2004 @@ -17,7 +17,7 @@ | Marcus Boerger <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: sqlite.c,v 1.128 2004/03/06 18:29:54 iliaa Exp $ + $Id: sqlite.c,v 1.129 2004/03/07 21:57:50 iliaa Exp $ */ #ifdef HAVE_CONFIG_H @@ -1054,7 +1054,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "SQLite support", "enabled"); - php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.128 2004/03/06 18:29:54 iliaa Exp $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.129 2004/03/07 21:57:50 iliaa Exp $"); php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); php_info_print_table_end(); @@ -2611,7 +2611,7 @@ /* binary string */ int enclen; - ret = emalloc( 1 + 5 + stringlen * (256 / 253) ); + ret = emalloc( 1 + 5 + stringlen * ((float) 256 / (float) 253) ); ret[0] = '\x01'; enclen = php_sqlite_encode_binary(string, stringlen, ret+1); RETVAL_STRINGL(ret, enclen+1, 0); @@ -2841,7 +2841,7 @@ int enclen; char *ret; - ret = emalloc( 1 + 5 + datalen * (256 / 253) ); + ret = emalloc( 1 + 5 + datalen * ((float) 256 / (float) 253) ); ret[0] = '\x01'; enclen = php_sqlite_encode_binary(data, datalen, ret+1); RETVAL_STRINGL(ret, enclen+1, 0);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php