You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
747 B
29 lines
747 B
Description: CVE-2018-5308
|
|
Acked-By: Mattia Rizzolo <mattia@debian.org>
|
|
Origin: https://sourceforge.net/p/podofo/code/1870
|
|
Origin: https://sourceforge.net/p/podofo/code/1876
|
|
|
|
--- a/src/base/PdfOutputStream.cpp
|
|
+++ b/src/base/PdfOutputStream.cpp
|
|
@@ -85,6 +85,11 @@
|
|
PdfMemoryOutputStream::PdfMemoryOutputStream( char* pBuffer, pdf_long lLen )
|
|
: m_lLen( 0 ), m_bOwnBuffer( false )
|
|
{
|
|
+ if( !pBuffer )
|
|
+ {
|
|
+ PODOFO_RAISE_ERROR( ePdfError_InvalidHandle );
|
|
+ }
|
|
+
|
|
m_lSize = lLen;
|
|
m_pBuffer = pBuffer;
|
|
}
|
|
@@ -98,7 +103,7 @@
|
|
|
|
pdf_long PdfMemoryOutputStream::Write( const char* pBuffer, pdf_long lLen )
|
|
{
|
|
- if( !m_pBuffer )
|
|
+ if( !pBuffer )
|
|
{
|
|
PODOFO_RAISE_ERROR( ePdfError_InvalidHandle );
|
|
}
|