Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/docx/image/tiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ def _parse_value(cls, stream_rdr, offset, value_count, value_offset):
The length of the string, including a terminating '\x00' (NUL) character, is in
`value_count`.
"""
if value_count <= 4:
return stream_rdr.read_str(value_count - 1, offset + 8)
return stream_rdr.read_str(value_count - 1, value_offset)


Expand Down