Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
php5
>
php-5.2.17
> php-5.2.14-CVE-2012-3365.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File php-5.2.14-CVE-2012-3365.patch of Package php-5.2.17 (Revision 19)
Currently displaying revision
19
,
show latest
http://git.php.net/?p=php-src.git;a=commit;h=055ecbc62878e86287d742c7246c21606cee8183 Index: ext/pdo_sqlite/sqlite_driver.c =================================================================== --- ext/pdo_sqlite/sqlite_driver.c.orig +++ ext/pdo_sqlite/sqlite_driver.c @@ -642,7 +642,7 @@ static struct pdo_dbh_methods sqlite_met static char *make_filename_safe(const char *filename TSRMLS_DC) { - if (*filename && strncmp(filename, ":memory:", sizeof(":memory:")-1)) { + if (*filename && memcmp(filename, ":memory:", sizeof(":memory:"))) { char *fullpath = expand_filepath(filename, NULL TSRMLS_CC); if (!fullpath) { Index: ext/sqlite/pdo_sqlite2.c =================================================================== --- ext/sqlite/pdo_sqlite2.c.orig +++ ext/sqlite/pdo_sqlite2.c @@ -515,7 +515,7 @@ static struct pdo_dbh_methods sqlite2_me static char *make_filename_safe(const char *filename TSRMLS_DC) { - if (*filename && strncmp(filename, ":memory:", sizeof(":memory:")-1)) { + if (*filename && memcmp(filename, ":memory:", sizeof(":memory:"))) { char *fullpath = expand_filepath(filename, NULL TSRMLS_CC); if (!fullpath) { Index: ext/sqlite/sqlite.c =================================================================== --- ext/sqlite/sqlite.c.orig +++ ext/sqlite/sqlite.c @@ -734,7 +734,7 @@ static int php_sqlite_authorizer(void *a { switch (access_type) { case SQLITE_COPY: - if (strncmp(arg4, ":memory:", sizeof(":memory:") - 1)) { + if (memcmp(arg4, ":memory:", sizeof(":memory:"))) { TSRMLS_FETCH(); if (PG(safe_mode) && (!php_checkuid(arg4, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { return SQLITE_DENY; @@ -747,7 +747,7 @@ static int php_sqlite_authorizer(void *a return SQLITE_OK; #ifdef SQLITE_ATTACH case SQLITE_ATTACH: - if (strncmp(arg3, ":memory:", sizeof(":memory:") - 1)) { + if (memcmp(arg3, ":memory:", sizeof(":memory:"))) { TSRMLS_FETCH(); if (PG(safe_mode) && (!php_checkuid(arg3, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { return SQLITE_DENY; @@ -1230,7 +1230,7 @@ PHP_FUNCTION(sqlite_popen) ZVAL_NULL(errmsg); } - if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { + if (memcmp(filename, ":memory:", sizeof(":memory:"))) { /* resolve the fully-qualified path name to use as the hash key */ if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) { RETURN_FALSE; @@ -1306,7 +1306,7 @@ PHP_FUNCTION(sqlite_open) ZVAL_NULL(errmsg); } - if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { + if (memcmp(filename, ":memory:", sizeof(":memory:"))) { /* resolve the fully-qualified path name to use as the hash key */ if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) { php_std_error_handling(); @@ -1358,7 +1358,7 @@ PHP_FUNCTION(sqlite_factory) ZVAL_NULL(errmsg); } - if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) { + if (memcmp(filename, ":memory:", sizeof(":memory:"))) { /* resolve the fully-qualified path name to use as the hash key */ if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) { php_std_error_handling();