diff options
author | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-16 21:28:08 +0000 |
---|---|---|
committer | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-16 21:28:08 +0000 |
commit | 142648d149fbb663fb405b0e46d32095964df0e1 (patch) | |
tree | 9dd26c92a53315ee8781c273cfa3f1f5434ab9d1 /third_party | |
parent | b8f0ba23089a7e5741df7245722759a9a42529ab (diff) | |
download | chromium_src-142648d149fbb663fb405b0e46d32095964df0e1.zip chromium_src-142648d149fbb663fb405b0e46d32095964df0e1.tar.gz chromium_src-142648d149fbb663fb405b0e46d32095964df0e1.tar.bz2 |
Don't access out-of-bounds arguments.
TEST=select REGEXP('abc') from sqlite_master
BUG=30510
Review URL: http://codereview.chromium.org/501038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34754 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/sqlite/ext/icu/icu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/sqlite/ext/icu/icu.c b/third_party/sqlite/ext/icu/icu.c index 57d59a6..8f7f76d 100644 --- a/third_party/sqlite/ext/icu/icu.c +++ b/third_party/sqlite/ext/icu/icu.c @@ -250,12 +250,12 @@ static void icuRegexpFunc(sqlite3_context *p, int nArg, sqlite3_value **apArg){ UErrorCode status = U_ZERO_ERROR; URegularExpression *pExpr; UBool res; - const UChar *zString = sqlite3_value_text16(apArg[1]); + const UChar *zString; /* If the left hand side of the regexp operator is NULL, ** then the result is also NULL. */ - if( !zString ){ + if( nArg<2 || !(zString=sqlite3_value_text16(apArg[1])) ){ return; } |