Skip to content

Commit

Permalink
Match against all 8 PNG file signature bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
sudhir-b committed Sep 24, 2024
1 parent 0c7f219 commit 9bd41d4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions filetype/types/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,11 @@ def match(self, buf):
buf[0] == 0x89 and
buf[1] == 0x50 and
buf[2] == 0x4E and
buf[3] == 0x47)

buf[3] == 0x47 and
buf[4] == 0x0D and
buf[5] == 0x0A and
buf[6] == 0x1A and
buf[7] == 0x0A)

class Gif(Type):
"""
Expand Down

0 comments on commit 9bd41d4

Please sign in to comment.