Skip to content

metadata.py - IndexError: string index out of range #15

@tbeertje21

Description

@tbeertje21

I get this error when text of metadata of a file has no space.
The bug happens in:
178 while text[size] != " ":

The fix that I use, prevents the value of size get out of bounds:
while (text[size] != ' ') and (abs(size)<section_size):

Then, worst case value of size: the whole text is taken (as nowhere a 'section boundary' by a space occurs).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions