diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2015-01-07 15:56:12 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2015-01-07 16:01:54 +0100 |
commit | b39f07f1a0066c8cd3072746f6c47718ad65fabe (patch) | |
tree | ab6f0c1d533a24a06a8d8f3f2bfd818fb6d997dd /connectivity | |
parent | f29bf4635958f7d4b8a22c0825cbcca4858ba037 (diff) |
protect agains past-the-end string access
Change-Id: I651c7b062b454fad85eff8852f7e62804a0d0058
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_tools.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index 3f8e85fb7c74..442a2a56d2bc 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -423,7 +423,7 @@ void splitSQL( const OString & sql, OStringVector &vec ) } else if( singleQuote ) { - if( '\'' == c && '\'' == sql[i+1] ) + if( '\'' == c && (i+1) < length && '\'' == sql[i+1] ) { // two subsequent single quotes within a quoted string // mean a single quote within the string |