tag 361605 patch moreinfo thanks Matt Brown <[EMAIL PROTECTED]> writes:
> On amd64 the sqlite_escape_string function is faulty and causes PHP to > kill the script due to PHP's internal memory limit being reached. [...] > php5-sqlite (linked against the same libsqlite0) is not affected and > neither is php4-sqlite on i386. Judging by the changes in PHP5, the problem is caused by the call to zend_parse_parameters(), which should be provided with an int rather than a long for the string length. Please test the following patch. --- php4-sqlite-1.0.2.dist/sqlite.c +++ php4-sqlite-1.0.2/sqlite.c @@ -1725,7 +1725,7 @@ PHP_FUNCTION(sqlite_escape_string) { char *string = NULL; - long stringlen; + int stringlen; char *ret; if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &string, &stringlen)) { Also, please test whether it accepts empty strings -- there's another change in PHP5 for that, but I'm not sure that it's strictly necessary. Thanks! Matej -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]