summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorJörg Budischewski <jbu@openoffice.org>2002-05-15 15:32:56 +0000
committerJörg Budischewski <jbu@openoffice.org>2002-05-15 15:32:56 +0000
commit0645e6a1a1917fef833358f328b5d56396380698 (patch)
treeffa934b214edb477a682bb11fe2b8fbe2aef6174 /sax
parent95f3adbf764e3905b67345f5e7b301bb2586663f (diff)
#97873# fixed possible memory corruption, when ' encoding=' is missing in the first line of an xml-file
Diffstat (limited to 'sax')
-rw-r--r--sax/source/expatwrap/xml2utf.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx
index 0e99bc3814fa..317c99bb3e8a 100644
--- a/sax/source/expatwrap/xml2utf.cxx
+++ b/sax/source/expatwrap/xml2utf.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xml2utf.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jbu $ $Date: 2000-10-25 08:13:18 $
+ * last change: $Author: jbu $ $Date: 2002-05-15 16:32:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -185,7 +185,7 @@ void XMLFile2UTFConverter::removeEncoding( Sequence<sal_Int8> &seq )
}
int nFound = str.indexOf( " encoding" );
- if( nFound < str.getLength() ) {
+ if( nFound >= 0 ) {
int nStop;
int nStart = str.indexOf( "\"" , nFound );
if( nStart < 0 || str.indexOf( "'" , nFound ) < nStart )