Skip to content

libview: Fix crash in the accessible code when page cache text is NULL

Colomban Wendling requested to merge cwendling/evince:no-text-crash into main

If ev_page_cache_get_text() returns NULL, it can crash both get_character_count() and get_substring() implementations of EvPageAccessible, although it's an valid return value from the former.

Fix those to implementations to handle this edge case.

Unfortunately I'm afraid I can't share the PDF that revealed the issue for me, but the fix here is pretty straightforward.

Edited by Colomban Wendling

Merge request reports