summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-13 19:30:28 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-13 19:30:28 +0000
commit5cdf25e444f99517f54ac66f039e550e3c23c50d (patch)
treecb5988a51dddf493841751ebf9b0d7617130aae1
parentd84df40f26d943499a3cead73128db707d900e36 (diff)
downloadchromium_src-5cdf25e444f99517f54ac66f039e550e3c23c50d.zip
chromium_src-5cdf25e444f99517f54ac66f039e550e3c23c50d.tar.gz
chromium_src-5cdf25e444f99517f54ac66f039e550e3c23c50d.tar.bz2
Convert degenerate memcmp() to strncmp() in SQLite TimeMachine patch.
BUG=178677 Review URL: https://chromiumcodereview.appspot.com/14651031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199794 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--third_party/sqlite/amalgamation/sqlite3.c2
-rw-r--r--third_party/sqlite/mac_time_machine.patch2
-rw-r--r--third_party/sqlite/src/src/pager.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/third_party/sqlite/amalgamation/sqlite3.c b/third_party/sqlite/amalgamation/sqlite3.c
index 247d842..c51a376 100644
--- a/third_party/sqlite/amalgamation/sqlite3.c
+++ b/third_party/sqlite/amalgamation/sqlite3.c
@@ -41637,7 +41637,7 @@ static int pager_open_journal(Pager *pPager){
** implementations. */
if( rc==SQLITE_OK && pPager->zFilename!=NULL
&& strlen(pPager->zFilename)>0
- && memcmp(pVfs->zName, "unix", 4)==0
+ && strncmp(pVfs->zName, "unix", 4)==0
&& ( pVfs->zName[4]=='-' || pVfs->zName[4]=='\0' ) ){
CFURLRef database = create_cfurl_from_cstring(pPager->zFilename);
if( CSBackupIsItemExcluded(database, NULL) ){
diff --git a/third_party/sqlite/mac_time_machine.patch b/third_party/sqlite/mac_time_machine.patch
index 905609e..bfd113b 100644
--- a/third_party/sqlite/mac_time_machine.patch
+++ b/third_party/sqlite/mac_time_machine.patch
@@ -55,7 +55,7 @@ Index: src/pager.c
+ ** implementations. */
+ if( rc==SQLITE_OK && pPager->zFilename!=NULL
+ && strlen(pPager->zFilename)>0
-+ && memcmp(pVfs->zName, "unix", 4)==0
++ && strncmp(pVfs->zName, "unix", 4)==0
+ && ( pVfs->zName[4]=='-' || pVfs->zName[4]=='\0' ) ){
+ CFURLRef database = create_cfurl_from_cstring(pPager->zFilename);
+ if( CSBackupIsItemExcluded(database, NULL) ){
diff --git a/third_party/sqlite/src/src/pager.c b/third_party/sqlite/src/src/pager.c
index 8cd31a9..19059c8 100644
--- a/third_party/sqlite/src/src/pager.c
+++ b/third_party/sqlite/src/src/pager.c
@@ -5209,7 +5209,7 @@ static int pager_open_journal(Pager *pPager){
** implementations. */
if( rc==SQLITE_OK && pPager->zFilename!=NULL
&& strlen(pPager->zFilename)>0
- && memcmp(pVfs->zName, "unix", 4)==0
+ && strncmp(pVfs->zName, "unix", 4)==0
&& ( pVfs->zName[4]=='-' || pVfs->zName[4]=='\0' ) ){
CFURLRef database = create_cfurl_from_cstring(pPager->zFilename);
if( CSBackupIsItemExcluded(database, NULL) ){