diff options
author | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-22 21:13:35 +0000 |
---|---|---|
committer | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-22 21:13:35 +0000 |
commit | f0e1d9fa17f7f2fd64d29b7c797baab0000b9125 (patch) | |
tree | e7aede07897eaf4ff02644376093b6cb72dfa363 /third_party/sqlite/attach-integer.patch | |
parent | a21ecf667e4b73294516efdb08958d1c02362d34 (diff) | |
download | chromium_src-f0e1d9fa17f7f2fd64d29b7c797baab0000b9125.zip chromium_src-f0e1d9fa17f7f2fd64d29b7c797baab0000b9125.tar.gz chromium_src-f0e1d9fa17f7f2fd64d29b7c797baab0000b9125.tar.bz2 |
Fix crash with "ATTACH 12345 as db". Believed to not have security impact.
BUG=38745
TEST="ATTACH 12345 as db"
Review URL: http://codereview.chromium.org/1108003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42255 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/sqlite/attach-integer.patch')
-rw-r--r-- | third_party/sqlite/attach-integer.patch | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/third_party/sqlite/attach-integer.patch b/third_party/sqlite/attach-integer.patch new file mode 100644 index 0000000..aa74e2e --- /dev/null +++ b/third_party/sqlite/attach-integer.patch @@ -0,0 +1,15 @@ +--- src/attach.c.orig 2010-03-21 21:28:14.144127448 -0700 ++++ src/attach.c 2010-03-21 21:55:58.224754199 -0700 +@@ -313,6 +313,12 @@ + #ifndef SQLITE_OMIT_AUTHORIZATION + if( pAuthArg ){ + char *zAuthArg = pAuthArg->u.zToken; ++ int i; ++ char iBuf[32]; ++ if( sqlite3ExprIsInteger(pAuthArg, &i) ){ ++ sqlite3_snprintf(sizeof(iBuf), iBuf, "%d", pAuthArg->u.iValue); ++ zAuthArg = iBuf; ++ } + if( NEVER(zAuthArg==0) ){ + goto attach_end; + } |