Bug 24733 - Incorrect movie size types
Summary: Incorrect movie size types
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium major
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-26 06:12 UTC by Ilya Gorenbein
Modified: 2009-10-28 11:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch to the problem (3.98 KB, patch)
2009-10-26 06:12 UTC, Ilya Gorenbein
Details | Splinter Review
Cast to integer patch (753 bytes, patch)
2009-10-28 01:13 UTC, Ilya Gorenbein
Details | Splinter Review

Description Ilya Gorenbein 2009-10-26 06:12:17 UTC
Created attachment 30694 [details] [review]
Patch to the problem

Hello,

I am using version 0.12.0. 
Due to absence of isInt() check, poppler crashes at Annot.cc 

          width = aspect->get(0, &tmp)->getInt(); (line 3542)

          and

          height = aspect->get(1, &tmp)->getInt();  (line 3544)

Moreover, thе attached file (link to it http://www.hinduismtoday.com/archives/2006/1-3/pdf/section-4_2006-01-01_p68-69.pdf) does not contains integers at width/height array. It contains doubles. I think that we should change it to getNum() instead of getInt(). This leads us to do more changes over the project, such as change of QSize to QSizeF. Patch is attached.

Regards,
Ilya Gorenbein
Comment 1 Albert Astals Cid 2009-10-27 13:07:55 UTC
Having a look at the specification it says the height and width are pixels, i see little reason to support decimal pixel sizes, so what about accepting reals but rounding them inside Annot code?
Comment 2 Ilya Gorenbein 2009-10-28 01:13:49 UTC
Created attachment 30762 [details] [review]
Cast to integer patch
Comment 3 Ilya Gorenbein 2009-10-28 01:15:48 UTC
I did the patch (to double) keeping in mind that we do not want to loose the data. Maybe in the future it will be useful.
Patch according to suggested by you solution (to int) is attached.
Comment 4 Albert Astals Cid 2009-10-28 11:23:03 UTC
Commited, thanks for the patch


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.