aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/contrib
diff options
context:
space:
mode:
authorUjjwal Verma <ujjwalverma1111@gmail.com>2018-01-11 18:30:38 +0530
committerUjjwal Verma <ujjwalverma1111@gmail.com>2018-01-11 18:30:38 +0530
commit737c74b010cd6069beae092e0cc319ee4cb6e35b (patch)
tree3a9c40c23308bfe165eb840740975d7929bdf02c /mitmproxy/contrib
parent8b06dffafbdfcac24004d02aae1a0b5a36f7d931 (diff)
downloadmitmproxy-737c74b010cd6069beae092e0cc319ee4cb6e35b.tar.gz
mitmproxy-737c74b010cd6069beae092e0cc319ee4cb6e35b.tar.bz2
mitmproxy-737c74b010cd6069beae092e0cc319ee4cb6e35b.zip
Update GIF parser
Diffstat (limited to 'mitmproxy/contrib')
-rw-r--r--mitmproxy/contrib/kaitaistruct/gif.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/mitmproxy/contrib/kaitaistruct/gif.py b/mitmproxy/contrib/kaitaistruct/gif.py
index 820df568..76d7fc16 100644
--- a/mitmproxy/contrib/kaitaistruct/gif.py
+++ b/mitmproxy/contrib/kaitaistruct/gif.py
@@ -35,9 +35,11 @@ class Gif(KaitaiStruct):
self.global_color_table = self._root.ColorTable(io, self, self._root)
self.blocks = []
- while not self._io.is_eof():
- self.blocks.append(self._root.Block(self._io, self, self._root))
-
+ while True:
+ _ = self._root.Block(self._io, self, self._root)
+ self.blocks.append(_)
+ if ((self._io.is_eof()) or (_.block_type == self._root.BlockType.end_of_file)) :
+ break
class ImageData(KaitaiStruct):
def __init__(self, _io, _parent=None, _root=None):