Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
b8eb5d0c
Kaydet (Commit)
b8eb5d0c
authored
Nis 01, 2011
tarafından
Fridrich Štrba
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Handle corrupted WP6 prefixes graciously
üst
c1a99ea6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
1 deletion
+109
-1
libwpd.corruptedprefix.patch
libwpd/libwpd.corruptedprefix.patch
+107
-0
makefile.mk
libwpd/makefile.mk
+2
-1
No files found.
libwpd/libwpd.corruptedprefix.patch
0 → 100644
Dosyayı görüntüle @
b8eb5d0c
--- misc/libwpd-0.9.1/src/lib/WP6PrefixDataPacket.cpp
+++ misc/build/libwpd-0.9.1/src/lib/WP6PrefixDataPacket.cpp
@@ -46,45 +46,67 @@ WP6PrefixDataPacket::WP6PrefixDataPacket(WPXInputStream * /* input */, WPXEncryp
}
WP6PrefixDataPacket * WP6PrefixDataPacket::constructPrefixDataPacket(WPXInputStream * input, WPXEncryption *encryption, WP6PrefixIndice *prefixIndice)
-{
- switch (prefixIndice->getType())
+{
+ WP6PrefixDataPacket *tmpPacket = 0;
+ try
+ {
+ switch (prefixIndice->getType())
+ {
+ case WP6_INDEX_HEADER_INITIAL_FONT:
+ tmpPacket = new WP6DefaultInitialFontPacket(input, encryption, prefixIndice->getID(),
+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
+ break;
+ case WP6_INDEX_HEADER_GENERAL_WORDPERFECT_TEXT:
+ tmpPacket = new WP6GeneralTextPacket(input, encryption, prefixIndice->getID(),
+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
+ break;
+ case WP6_INDEX_HEADER_DESIRED_FONT_DESCRIPTOR_POOL:
+ tmpPacket = new WP6FontDescriptorPacket(input, encryption, prefixIndice->getID(),
+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
+ break;
+ case WP6_INDEX_HEADER_FILL_STYLE:
+ tmpPacket = new WP6FillStylePacket(input, encryption, prefixIndice->getID(),
+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
+ break;
+ case WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY:
+ tmpPacket = new WP6ExtendedDocumentSummaryPacket(input, encryption, prefixIndice->getID(),
+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
+ break;
+ case WP6_INDEX_HEADER_OUTLINE_STYLE:
+ tmpPacket = new WP6OutlineStylePacket(input, encryption, prefixIndice->getID(),
+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
+ break;
+ case WP6_INDEX_HEADER_GRAPHICS_FILENAME:
+ tmpPacket = new WP6GraphicsFilenamePacket(input, encryption, prefixIndice->getID(), prefixIndice->getFlags(),
+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
+ break;
+ case WP6_INDEX_HEADER_GRAPHICS_CACHED_FILE_DATA:
+ tmpPacket = new WP6GraphicsCachedFileDataPacket(input, encryption, prefixIndice->getID(),
+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
+ break;
+ case WP6_INDEX_HEADER_GRAPHICS_BOX_STYLE:
+ tmpPacket = new WP6GraphicsBoxStylePacket(input, encryption, prefixIndice->getID(),
+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
+ break;
+ case WP6_INDEX_HEADER_TABLE_STYLE:
+ tmpPacket = new WP6TableStylePacket(input, encryption, prefixIndice->getID(),
+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
+ break;
+ case WP6_INDEX_HEADER_COMMENT_ANNOTATION:
+ tmpPacket = new WP6CommentAnnotationPacket(input, encryption, prefixIndice->getID(),
+ prefixIndice->getDataOffset(), prefixIndice->getDataSize());
+ break;
+ default:
+ break;;
+ }
+ }
+ catch (FileException)
{
- case WP6_INDEX_HEADER_INITIAL_FONT:
- return new WP6DefaultInitialFontPacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_GENERAL_WORDPERFECT_TEXT:
- return new WP6GeneralTextPacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_DESIRED_FONT_DESCRIPTOR_POOL:
- return new WP6FontDescriptorPacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_FILL_STYLE:
- return new WP6FillStylePacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_EXTENDED_DOCUMENT_SUMMARY:
- return new WP6ExtendedDocumentSummaryPacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_OUTLINE_STYLE:
- return new WP6OutlineStylePacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_GRAPHICS_FILENAME:
- return new WP6GraphicsFilenamePacket(input, encryption, prefixIndice->getID(), prefixIndice->getFlags(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_GRAPHICS_CACHED_FILE_DATA:
- return new WP6GraphicsCachedFileDataPacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_GRAPHICS_BOX_STYLE:
- return new WP6GraphicsBoxStylePacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_TABLE_STYLE:
- return new WP6TableStylePacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- case WP6_INDEX_HEADER_COMMENT_ANNOTATION:
- return new WP6CommentAnnotationPacket(input, encryption, prefixIndice->getID(),
- prefixIndice->getDataOffset(), prefixIndice->getDataSize());
- default:
- return 0;
+ if (tmpPacket)
+ delete tmpPacket;
+ tmpPacket = 0;
}
+ return tmpPacket;
}
void WP6PrefixDataPacket::_read(WPXInputStream *input, WPXEncryption *encryption, uint32_t dataOffset, uint32_t dataSize)
libwpd/makefile.mk
Dosyayı görüntüle @
b8eb5d0c
...
@@ -43,7 +43,8 @@ TARGET=wpd
...
@@ -43,7 +43,8 @@ TARGET=wpd
TARFILE_NAME
=
libwpd-0.9.1
TARFILE_NAME
=
libwpd-0.9.1
TARFILE_MD5
=
5ff846847dab351604ad859e2fd4ed3c
TARFILE_MD5
=
5ff846847dab351604ad859e2fd4ed3c
PATCH_FILES
=
libwpd.gcc460.patch
PATCH_FILES
=
libwpd.gcc460.patch
\
libwpd.corruptedprefix.patch
BUILD_ACTION
=
dmake
$(MFLAGS)
$(CALLMACROS)
BUILD_ACTION
=
dmake
$(MFLAGS)
$(CALLMACROS)
BUILD_DIR
=
src
$/
lib
BUILD_DIR
=
src
$/
lib
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment