mirror of
https://github.com/unidoc/unipdf.git
synced 2025-05-05 19:30:30 +08:00
Add type check for Size in trailer. Fixes #77
This commit is contained in:
parent
5f506b7427
commit
1769c68234
@ -804,8 +804,8 @@ func (this *PdfParser) parseXrefStream(xstm *PdfObjectInteger) (*PdfObjectDictio
|
|||||||
|
|
||||||
trailerDict := xs.PdfObjectDictionary
|
trailerDict := xs.PdfObjectDictionary
|
||||||
|
|
||||||
sizeObj := xs.PdfObjectDictionary.Get("Size").(*PdfObjectInteger)
|
sizeObj, ok := xs.PdfObjectDictionary.Get("Size").(*PdfObjectInteger)
|
||||||
if sizeObj == nil {
|
if !ok {
|
||||||
common.Log.Debug("ERROR: Missing size from xref stm")
|
common.Log.Debug("ERROR: Missing size from xref stm")
|
||||||
return nil, errors.New("Missing Size from xref stm")
|
return nil, errors.New("Missing Size from xref stm")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user