[Libreoffice-commits] core.git: 2 commits - vcl/source writerfilter/source
Caolán McNamara
caolanm at redhat.com
Fri Apr 11 03:20:04 PDT 2014
vcl/source/gdi/pdfwriter_impl.cxx | 7 +++++++
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 7 ++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
New commits:
commit 2cb2fc5612531eb5e0205909da3d491e14a15e63
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Apr 11 10:58:22 2014 +0100
coverity#708628 Uninitialized pointer field
Change-Id: I340eb9e7550083818874fed90d0a94e15fd597fd
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index cb8b0b3..4f054a6 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1714,16 +1714,23 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal
m_nInheritedPageHeight( 842 ), // default A4
m_eInheritedOrientation( PDFWriter::Portrait ),
m_nCurrentPage( -1 ),
+ m_nCatalogObject(0),
m_nSignatureObject( -1 ),
m_nSignatureContentOffset( 0 ),
m_nSignatureLastByteRangeNoOffset( 0 ),
m_nResourceDict( -1 ),
m_nFontDictObject( -1 ),
+ m_aFile(0),
+ m_bOpen(false),
m_pCodec( NULL ),
+ m_pMemStream(NULL),
m_aDocDigest( rtl_digest_createMD5() ),
m_aCipher( (rtlCipher)NULL ),
m_aDigest( NULL ),
+ m_nKeyLength(0),
+ m_nRC4KeyLength(0),
m_bEncryptThisStream( false ),
+ m_nAccessPermissions(0),
m_pEncryptionBuffer( NULL ),
m_nEncryptionBufferSize( 0 ),
m_bIsPDF_A1( false ),
commit a1ea3838adee634ccf725bc5f2be7805c6294a16
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Apr 11 11:10:14 2014 +0100
check that stacks are not empty before top()
Change-Id: Iad5b3381b8201c5ac32a5bdf99bd3d5872ea3afc
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 539eb51..51810b3 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1212,6 +1212,9 @@ void DomainMapper_Impl::appendTextContent(
const uno::Sequence< beans::PropertyValue > xPropertyValues
)
{
+ SAL_WARN_IF(m_aTextAppendStack.empty(), "writerfilter.dmapper", "no text append stack");
+ if (m_aTextAppendStack.empty())
+ return;
uno::Reference< text::XTextAppendAndConvert > xTextAppendAndConvert( m_aTextAppendStack.top().xTextAppend, uno::UNO_QUERY );
OSL_ENSURE( xTextAppendAndConvert.is(), "trying to append a text content without XTextAppendAndConvert" );
if(xTextAppendAndConvert.is() && ! getTableManager( ).isIgnore())
@@ -1276,7 +1279,9 @@ void DomainMapper_Impl::appendOLE( const OUString& rStreamName, OLEHandlerPtr pO
// gives a better ( visually ) result
xOLEProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_ANCHOR_TYPE ), uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) );
// remove ( if valid ) associated shape ( used for graphic replacement )
- m_aAnchoredStack.top( ).bToRemove = true;
+ SAL_WARN_IF(m_aAnchoredStack.empty(), "writerfilter.dmapper", "no anchor stack");
+ if (!m_aAnchoredStack.empty())
+ m_aAnchoredStack.top( ).bToRemove = true;
RemoveLastParagraph();
m_aTextAppendStack.pop();
More information about the Libreoffice-commits
mailing list