Skip to content

nemo-odf-to-txt: fix IndexError in handle_data on leading text:s tag - #3826

Merged
mtwebster merged 1 commit into
linuxmint:masterfrom
leigh123linux:fix-odf-helper
Aug 21, 2026
Merged

nemo-odf-to-txt: fix IndexError in handle_data on leading text:s tag#3826
mtwebster merged 1 commit into
linuxmint:masterfrom
leigh123linux:fix-odf-helper

Conversation

@leigh123linux

@leigh123linux leigh123linux commented Aug 21, 2026

Copy link
Copy Markdown
Member

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2520985

leigh@mpd-pc:~/Desktop/nemo/search-helpers (fix-odf-helper)$ python3 /usr/bin/nemo-odf-to-txt repro.odg
Traceback (most recent call last):
  File "/usr/bin/nemo-odf-to-txt", line 41, in <module>
    parser.feed(contents)
    ~~~~~~~~~~~^^^^^^^^^^
  File "/usr/lib64/python3.14/html/parser.py", line 187, in feed
    self.goahead(0)
    ~~~~~~~~~~~~^^^
  File "/usr/lib64/python3.14/html/parser.py", line 271, in goahead
    self.handle_data(unescape(rawdata[i:j]))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/nemo-odf-to-txt", line 26, in handle_data
    self.parsed[-1] += " " + data
    ~~~~~~~~~~~^^^^
IndexError: list index out of range
leigh@mpd-pc:~/Desktop/nemo/search-helpers (fix-odf-helper)$ python3 nemo-odf-to-txt repro.odg
content: hello world

leigh@mpd-pc:~/Desktop/nemo/search-helpers (fix-odf-helper)$ 

test file to reproduce crash

repro.odg

@mtwebster
mtwebster merged commit fb689da into linuxmint:master Aug 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants