AbdullZ7 / pdfium

Automatically exported from code.google.com/p/pdfium
0 stars 0 forks source link

Check CPDF_Object::GetDict() return value in function CPDF_DataAvail::CheckTrailer(fpdf_parser_parser.cpp) #94

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

GetDirectInteger is called in function CPDF_DataAvail::CheckTrailer:

FX_DWORD xrefpos = GetDirectInteger(pTrailer->GetDict(), FX_BSTRC("Prev"));

pTrailer->GetDict() may return NULL.

While Function GetDirectInteger directly use this pointer:

static FX_INT32 GetDirectInteger(CPDF_Dictionary* pDict, FX_BSTR key)
{
    CPDF_Object* pObj = pDict->GetElement(key);
    if (pObj == NULL) {
        return 0;
    }
......

Original issue reported on code.google.com by look.wan...@gmail.com on 16 Dec 2014 at 6:48