Bug 60377 - NamedDests in glib frontend are broken
Summary: NamedDests in glib frontend are broken
Status: RESOLVED MOVED
Alias: None
Product: poppler
Classification: Unclassified
Component: glib frontend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-06 16:39 UTC by Jose Aliste
Modified: 2018-08-21 11:21 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch (4.33 KB, patch)
2013-11-11 18:36 UTC, Jose Aliste
Details | Splinter Review

Description Jose Aliste 2013-02-06 16:39:54 UTC
Hi, currently, NamedDests in glib frontend are brokend. This is because in the pdf reference, Names trees can hold very wild strings, including byte strings, where the '\0' ending character assumption does not hold. Thus, a gchar * is not a good way of describing named destinations on the glib world. On test file, 
all the goostrings are alright, but when transforming these to gchar *, some of the byte strings have a '\0' before the end of the string. 

This makes these PopplerDest objects unusable. We should get some more fancy API for that (Like using GBytes? and adding some methods to check if it is a proper string or so) or not to convert the name to gchar and use the PopplerDest object instead of the name on the find_link_dest and find_link_page funcs.
Comment 1 Jose Aliste 2013-11-11 18:36:36 UTC
Created attachment 89043 [details] [review]
patch

So this patch fixes the issue without altering the api or abi.  you can find a testcase in http://www.dim.uchile.cl/~jaliste/named_dests.pdf 

Note that after the patch some of the links still are not found because the cmp function of GooString is wrong (see https://bugs.freedesktop.org/show_bug.cgi?id=26049)
Comment 2 GitLab Migration User 2018-08-21 11:21:16 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/631.


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.