Only need to read 4 bytes

This commit is contained in:
hugovk 2017-03-04 16:39:03 +02:00
parent 35e6cb1d09
commit 277d8123a4

View File

@ -40,7 +40,7 @@ class BufrStubImageFile(ImageFile.StubImageFile):
offset = self.fp.tell()
if not _accept(self.fp.read(8)):
if not _accept(self.fp.read(4)):
raise SyntaxError("Not a BUFR file")
self.fp.seek(offset)