summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2015-01-07 15:56:12 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2015-01-07 16:01:54 +0100
commitb39f07f1a0066c8cd3072746f6c47718ad65fabe (patch)
treeab6f0c1d533a24a06a8d8f3f2bfd818fb6d997dd /connectivity
parentf29bf4635958f7d4b8a22c0825cbcca4858ba037 (diff)
protect agains past-the-end string access
Change-Id: I651c7b062b454fad85eff8852f7e62804a0d0058
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/postgresql/pq_tools.cxx2
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