Skip to content

Commit

Permalink
Merge pull request #93 from toaarnio/master
Browse files Browse the repository at this point in the history
Fix failure to decode a minimal 1 x 1 pixel JPEG
  • Loading branch information
hMatoba authored Jul 1, 2019
2 parents afd0d23 + 85d22e5 commit 20f25f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion piexif/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def read_exif_from_file(filename):
head = data[2:6]
HEAD_LENGTH = 4
exif = None
while 1:
while len(head) == HEAD_LENGTH:
length = struct.unpack(">H", head[2: 4])[0]

if head[:2] == b"\xff\xe1":
Expand Down

0 comments on commit 20f25f4

Please sign in to comment.