Kaydet (Commit) b12e9ec1 authored tarafından Eike Rathke's avatar Eike Rathke

Fix INetURLObject::operator==() when comparing paths

Regression from

    commit 43a6b595
    Date:   Mon Jul 10 12:42:24 2017 +0200

        simplify some OUString compareTo calls

        to either startsWith or == or !=

aPath2.startsWith(aPath1) is not the same as
aPath1.compareTo(aPath2, nLength) == 0
if aPath1 is longer than aPath2 ...

The consequence was a broken Macro Security Trusted Location that never
matched.

Change-Id: I6b7adab42982c020f3677bf24f18edd14210ffdf
üst 8303540b
...@@ -3694,7 +3694,7 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const ...@@ -3694,7 +3694,7 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const
default: default:
return false; return false;
} }
return aPath2.startsWith(aPath1); return aPath1.compareTo(aPath2, nLength) == 0;
} }
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment