summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2014-09-18 00:46:16 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-09-18 13:24:43 +0000
commit6b2b496cc5d6009151ae6d38d5d39cc5f536794e (patch)
tree8ac303f5178b214cd25a6b18b27a541f3b02f7c1
parent6f87913d843a97963703721506495bd57af36461 (diff)
bnc#887307 ODF files not showing up on Windows search
Under Windows 7, ODF and OpenOffice.org 1.1 files were not found, when the folder containing them was not indexed, and full text search was switched on. The problem did not occur under Windows 8. Apparently there is a bug in Windows 7, reading beyond the end of a BufferStream resulted in 0 bytes read. So we take care not to read beyond the end of stream. Change-Id: Id01b08922121dabbb7b49c54f8ef11cb0e4ac413 (cherry picked from commit ae4c836b49a8ac41312f855e24f20b0b050fcbd4) Reviewed-on: https://gerrit.libreoffice.org/11497 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--shell/source/win32/zipfile/zipfile.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx
index 270fbe1ec6bd..5dcc02a6a3bb 100644
--- a/shell/source/win32/zipfile/zipfile.cxx
+++ b/shell/source/win32/zipfile/zipfile.cxx
@@ -304,7 +304,7 @@ static bool findCentralDirectoryEnd(StreamInterface *stream)
try
{
- for (long nOffset = nLength - BLOCK_SIZE;
+ for (long nOffset = nLength - BLOCK_SIZE - 4;
nOffset > 0; nOffset -= BLOCK_SIZE)
{
if (findSignatureAtOffset(stream, nOffset))