diff --git a/Common/OfficeFileFormatChecker2.cpp b/Common/OfficeFileFormatChecker2.cpp index 4cd5a41bb8..32ebebca5d 100644 --- a/Common/OfficeFileFormatChecker2.cpp +++ b/Common/OfficeFileFormatChecker2.cpp @@ -94,12 +94,18 @@ bool COfficeFileFormatChecker::isXlsFormatFile (POLE::Storage * storage) { if (storage == NULL) return false; - POLE::Stream stream(storage, "Workbook"); + unsigned char buffer[10]; + + POLE::Stream stream(storage, "Workbook"); - unsigned char buffer[10]; if (stream.read(buffer,10) >0) return true; + POLE::Stream stream2(storage, "Book"); + + if (stream2.read(buffer,10) >0) + return true; + return false; } bool COfficeFileFormatChecker::isPptFormatFile (POLE::Storage * storage)