After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685741 - Segfault at fixed_doc_end_element
Segfault at fixed_doc_end_element
Status: RESOLVED FIXED
Product: libgxps
Classification: Platform
Component: general
0.2.x
Other Linux
: Normal normal
: ---
Assigned To: libgxps maintainers
libgxps maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-08 17:42 UTC by Pasi Saarinen
Modified: 2012-11-03 09:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pasi Saarinen 2012-10-08 17:42:53 UTC
Documents/1/FixedDocument.fdoc:

<?xml version="1.0" encoding="utf-8"?>
<FixedDocument xmlns="http://schemas.microsoft.com/xps/2005/06">
<FixedDocument xmlns="http://schemas.microsoft.com/xps/2005/06">
<PageContent Source="/Documents/1/Pages/2.fpage"/>
</FixedDocument>
</FixedDocument>

Error in gdb:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdffff700 (LWP 3764)]
0x00007fffec21da0e in fixed_doc_end_element (context=0x7fffd800cd90, element_name=0x7fffd800cc80 "FixedDocument", user_data=0x7fffd800f790, error=
    0x7fffdfffd7d8) at gxps-document.c:186


Caused by
185: for (l = data->pages; l; l = g_list_next (l))
186:	data->doc->priv->pages[--data->n_pages] = (Page *)l->data;

Which is only intended to be run once, but the nested FixedDocument causes it to run twice.
Comment 1 Carlos Garcia Campos 2012-10-21 10:09:14 UTC
hmm, I would sat the document is buggy, the spec says the FixedDocument element contains one or more PageContent elements. Anyway, we shouldn't crash even for buggy documents, I'll look at it.
Comment 2 Carlos Garcia Campos 2012-11-03 09:18:35 UTC
This should be fixed in current git master now. Thanks for reporting.