Skip to content

ascii values without \x00 ending#127

Open
EasyIsrael wants to merge 1 commit intohMatoba:masterfrom
EasyIsrael:master
Open

ascii values without \x00 ending#127
EasyIsrael wants to merge 1 commit intohMatoba:masterfrom
EasyIsrael:master

Conversation

@EasyIsrael
Copy link

@EasyIsrael EasyIsrael commented Jan 19, 2022

in some images there are ascii values without terminating null character ( \x00 ).
this is a fix for that case.
It reduces all characters after a null character in an ascii text

the Github- project exifread solves this problem the same way. Have a look at
https://github.com/ianare/exif-py/blob/develop/exifread/classes.py in method _process_field2 on line 193.

in some images there are ascii values  without terminating null character ( \x00 ).
this is a fix for that case.
It reduces all characters after a null character in an ascii text
data = self.tiftag[pointer: pointer+length]
data = data.split(b'\x00', 1)[0]
else:
data = value[0: length - 1]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case is uncovered, data = data.split(b'\x00', 1)[0] should be after if statement.

mikhail-iurkov added a commit to uploadcare/Piexif that referenced this pull request Jan 20, 2022
mikhail-iurkov added a commit to uploadcare/Piexif that referenced this pull request Jan 21, 2022
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