Skip to content

Commit

Permalink
ROB: Out-of-bounds issue in handle_tj (text extraction) (#2342)
Browse files Browse the repository at this point in the history
Closes #2320
  • Loading branch information
rgwood-rely committed Dec 14, 2023
1 parent 38795f5 commit 40bc577
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pypdf/_text_extraction/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,10 @@ def handle_tj(
rtl_dir: bool,
visitor_text: Optional[Callable[[Any, Any, Any, Any, Any], None]],
) -> Tuple[str, bool]:

m = mult(tm_matrix, cm_matrix)
orientation = orient(m)
if orientation in orientations:
if orientation in orientations and len(operands) > 0:
if isinstance(operands[0], str):
text += operands[0]
else:
Expand Down

0 comments on commit 40bc577

Please sign in to comment.