NULL ptr dereference in TextSelectionPainter::hasGlyphLessFont() with certain PDF

Bug #1855596 reported by Enrik Berkhan
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
poppler (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When viewing a certain PDF (which I unfortunately can't share) using evince, a see a crash in libpoppler90. It's a NULL pointer dereference in TextSelectionPainter::hasGlyphLessFont(), because in this certain PDF, for whatever reason, sel->word->getFontName(0) may return NULL.

Attached you'll find a proposed patch increasing the robustness in this case.

Cheers,
Enrik

Tags: patch
Revision history for this message
Enrik Berkhan (enrikb) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Fixes a possible NULL ptr dereference in TextSelectionPainter::hasGlyphLessFont()" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in poppler (Ubuntu):
status: New → Confirmed
Revision history for this message
Mue Fom (2a4b172045b63c84177f9ffd0b6a8939) wrote :

Please find attached a sample PDF demonstrating the problem.

It was produced by pdflatex on this file:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% -*- compile-command: "pdflatex t1-test && evince t1-test.pdf" -*-
\documentclass[12pt,a4paper]{article}

% \usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\begin{document}

Just a little test:

Try to select some text in evince!

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Revision history for this message
Mue Fom (2a4b172045b63c84177f9ffd0b6a8939) wrote :

Bug was introduced by LP #1830473 (Does not handle glyphless fonts, as used by tesseract)

Revision history for this message
Julian Andres Klode (juliank) wrote :

This is a duplicate of bug 1849773

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.