connectivity/source/drivers/postgresql/pq_tools.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit cd0700994b4ced5cfb8504c1b58ebfdbc3515674 Author: Lionel Elie Mamane <[email protected]> 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/13798 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index ff89568..3610dbb 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 [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
