From 1ebf34c67142d1a36923ad6511301fb4b7458edd Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 17 Sep 2017 17:51:43 +0100 Subject: protect against short file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I20c6a6fb34485f42c2a828618e8918d8a441860a Reviewed-on: https://gerrit.libreoffice.org/42389 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sax/source/expatwrap/xml2utf.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sax') diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx index fde25ce8482b..58ee36c1c829 100644 --- a/sax/source/expatwrap/xml2utf.cxx +++ b/sax/source/expatwrap/xml2utf.cxx @@ -221,8 +221,7 @@ bool XMLFile2UTFConverter::scanForEncoding( Sequence< sal_Int8 > &seq ) } // first level : detect possible file formats - if( ! strncmp( reinterpret_cast(pSource), "= 5 && !strncmp(reinterpret_cast(pSource), "(pSource), seq.getLength() ); -- cgit