connectivity/source/drivers/postgresql/pq_tools.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 97e0b6d1810fcc9d84da108fb470aaf7b8ea4a37 Author: Lionel Elie Mamane <lio...@mamane.lu> Date: Wed Jan 7 15:56:12 2015 +0100 protect agains past-the-end string access Change-Id: I651c7b062b454fad85eff8852f7e62804a0d0058 Reviewed-on: https://gerrit.libreoffice.org/13796 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index 3f8e85f..442a2a5 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
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits