Merge to XFA: Fix uninitialized value in CFX_ByteString::FormatInteger
[pdfium.git] / core / include / fpdfapi / fpdf_objects.h
index 622f39d..ec052af 100644 (file)
@@ -49,6 +49,11 @@ public:
         return m_ObjNum;
     }
 
+    FX_DWORD                            GetGenNum() const
+    {
+        return m_GenNum;
+    }
+
     FX_BOOL                                    IsIdentical(CPDF_Object* pObj) const;
 
     CPDF_Object*                       Clone(FX_BOOL bDirect = FALSE) const;
@@ -90,9 +95,11 @@ protected:
     CPDF_Object()
     {
         m_ObjNum = 0;
+        m_GenNum = 0;
     }
 
     FX_DWORD                           m_ObjNum;
+    FX_DWORD                           m_GenNum;
 
     void                                       Destroy();
 
@@ -158,10 +165,10 @@ public:
         return FX_NEW CPDF_Number(bInteger, pData);
     }
 
-    CPDF_Number()
+    CPDF_Number(): m_Integer(0) 
     {
         m_Type = PDFOBJ_NUMBER;
-    }
+    } 
 
     CPDF_Number(FX_BOOL bInteger, void* pData);
 
@@ -620,7 +627,7 @@ public:
 
     CPDF_Dictionary*           GetDict() const
     {
-        return m_pStream->GetDict();
+        return m_pStream? m_pStream->GetDict() : NULL;
     }
 
     FX_LPCBYTE                         GetData() const;