From 0db950ded89aa916fba40d27479a6722ec9a05c7 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Thu, 11 Sep 2014 18:14:42 +0200 Subject: bug wrong order of test cause out of bound access. Change-Id: If9c497473bc163677175b0fda1f3a8975cceb3dd --- ucbhelper/source/client/proxydecider.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx index 66ff40654920..f5e1b3ebb6b4 100644 --- a/ucbhelper/source/client/proxydecider.cxx +++ b/ucbhelper/source/client/proxydecider.cxx @@ -496,8 +496,8 @@ const InternetProxyServer & InternetProxyDecider_Impl::getProxy( OUString aHost; - if ( ( rHost[ 0 ] == '[' ) && - ( rHost.getLength() > 1 ) ) + if ( ( rHost.getLength() > 1 ) && + ( rHost[ 0 ] == '[' )) { // host is given as numeric IPv6 address. name resolution // functions need hostname without square brackets. -- cgit v1.2.3