Bug 47063

Summary: logic error in Rendition parsing code
Product: poppler Reporter: Tobias Koenig <tobias.koenig>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch that fixes MediaRendition parsing

Description Tobias Koenig 2012-03-07 09:20:06 UTC
Created attachment 58128 [details] [review]
Patch that fixes MediaRendition parsing

The parsing code for MediaRendition contains an logic error which causes valid media rendition objects to be marked as invalid ones.

The PDF references says in Table 9.6: "P dictionary (Required if C is not present, otherwise optional)."

Or in other words: if (!C && !P) -> error
but the current implementation does: if (!P && C) -> error

The attached patch fixes this.
Comment 1 Carlos Garcia Campos 2012-03-07 09:33:12 UTC
Comment on attachment 58128 [details] [review]
Patch that fixes MediaRendition parsing

Review of attachment 58128 [details] [review]:
-----------------------------------------------------------------

Right, good catch! Thanks.
Comment 2 Carlos Garcia Campos 2012-03-07 09:37:41 UTC
Pushed

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.