diff options
Diffstat (limited to 'package/source/zipapi/ZipFile.cxx')
-rw-r--r-- | package/source/zipapi/ZipFile.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index bb178f5a8ef5..f2dc709423f1 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -664,6 +664,8 @@ bool ZipFile::readLOC( ZipEntry &rEntry ) const sal_Int64 nBytesAvailable = aGrabber.getLength() - aGrabber.getPosition(); if (nPathLenToRead > nBytesAvailable) nPathLenToRead = nBytesAvailable; + else if (nPathLenToRead < 0) + nPathLenToRead = 0; // read always in UTF8, some tools seem not to set UTF8 bit uno::Sequence<sal_Int8> aNameBuffer(nPathLenToRead); |