Bug 47063 - logic error in Rendition parsing code
Summary: logic error in Rendition parsing code
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-07 09:20 UTC by Tobias Koenig
Modified: 2012-03-07 09:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch that fixes MediaRendition parsing (413 bytes, patch)
2012-03-07 09:20 UTC, Tobias Koenig
Details | Splinter Review

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.