diff options
Diffstat (limited to 'sax/source/expatwrap/xml2utf.cxx')
-rw-r--r-- | sax/source/expatwrap/xml2utf.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx index 420f90b6c3f0..9e531b13cfa6 100644 --- a/sax/source/expatwrap/xml2utf.cxx +++ b/sax/source/expatwrap/xml2utf.cxx @@ -117,7 +117,7 @@ sal_Int32 XMLFile2UTFConverter::readAndConvert( Sequence<sal_Int8> &seq , sal_In void XMLFile2UTFConverter::removeEncoding( Sequence<sal_Int8> &seq ) { const sal_Int8 *pSource = seq.getArray(); - if (!(seq.getLength() >= 5 && !strncmp(reinterpret_cast<const char *>(pSource), "<?xml", 5))) + if (seq.getLength() < 5 || strncmp(reinterpret_cast<const char *>(pSource), "<?xml", 5)) return; // scan for encoding |