[poppler] Unicode page labels should not contain a NUL at the end

Albert Astals Cid aacid at kde.org
Mon Apr 9 10:10:57 PDT 2012

El Diumenge, 8 d'abril de 2012, a les 23:29:13, Fabio D'Urso va escriure:
> The attached one-page document (generated with TexLive 2011 by an Okular
> user) labels its only page with the unicode string "1" <FEFF0031>.
> In qt4, Page::label() returns a QString containing "1\0" (i.e. 2 character
> long with a NUL character at the end). I haven't tested, but I think the
> same goes for the other frontends.
> I think that the issue is in PageLabelInfo::indexToLabel, because it's here
> where the extra NUL is appended.
> This extra NUL seems to be wrong, because GooStrings are not NUL terminated
> in the non-unicode case.
> It also confuses Okular, making it assume that page labels differ from page
> indices.
> I'm attaching a patch that removes the NUL at the end.



More information about the poppler mailing list