GNOME Bugzilla – Bug 738015
get_pretty_name can not handle empty strings
Last modified: 2014-10-07 09:32:23 UTC
If the input to get_pretty_name is '', then it ends up executing the following statement with i = -1, which leads to a crash: basename = g_utf8_substring (trimmed, 0, i); This is because both last_sentence and last_word are set to -1. This can happen if ev_document_text_get_text returns an empty string for a bookmarked page. eg., the first page in the attached PDF.
Sample PDF: https://rishi.fedorapeople.org/new-headway-intermediate-student-39s-book.pdf
Created attachment 287865 [details] [review] places-bookmarks: Don't crash if page has no text
Review of attachment 287865 [details] [review]: Thanks!
Comment on attachment 287865 [details] [review] places-bookmarks: Don't crash if page has no text Thanks for the quick review, Cosimo!