[Poppler-bugs] [Bug 44085] pdfinfo/pdffonts cannot process >2GB files

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jan 24 04:46:18 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=44085

--- Comment #36 from Albert Astals Cid <tsdgeos at terra.es> ---
Works good :-)

Only one thing i'm not so sure about isNum and getNum returning the int64
stuff. That is, you can't really represent all the int64 values in a double, so
by using getNum we might lose data.

Proof:
    long long myLong = 9223372036854774700ll;
    double myDouble = myLong;
    printf("%lld\n", myLong);
    printf("%f\n", myDouble);

Result:
9223372036854774700
9223372036854774784.000000

On the other hand this seems to happen for ridiculously high values, i.e. a
double is perfectly fine to handle stuff as the value of 160GB, so maybe just
add a comment in getNum like "// Warning this may break for ridiculously big
values of long long"

What do you think?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20130124/a6e49fdc/attachment.html>


More information about the Poppler-bugs mailing list