1 parent 0c7f219 commit 6553f0fCopy full SHA for 6553f0f
1 file changed
filetype/types/image.py
@@ -133,12 +133,15 @@ def __init__(self):
133
)
134
135
def match(self, buf):
136
- return (len(buf) > 3 and
+ return (len(buf) > 8 and
137
buf[0] == 0x89 and
138
buf[1] == 0x50 and
139
buf[2] == 0x4E and
140
- buf[3] == 0x47)
141
-
+ buf[3] == 0x47 and
+ buf[4] == 0x0D and
142
+ buf[5] == 0x0A and
143
+ buf[6] == 0x1A and
144
+ buf[7] == 0x0A)
145
146
class Gif(Type):
147
"""
0 commit comments