diff options
| author | Rusty Wagner <rusty@vector35.com> | 2019-05-24 20:08:25 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2019-05-24 20:08:25 -0400 |
| commit | fd47bbe9e3cf567ae355570620bd9b0e26c62120 (patch) | |
| tree | c93f536e4890348108fb1ebfcbc816bbbc3a3747 /python | |
| parent | f229958f0eadd39a37681aa12ffb2ac9d6df60d7 (diff) | |
Limit size of entropy image to fix crash
Diffstat (limited to 'python')
| -rw-r--r-- | python/examples/triage/entropy.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/examples/triage/entropy.py b/python/examples/triage/entropy.py index 94afd650..57e9d2c4 100644 --- a/python/examples/triage/entropy.py +++ b/python/examples/triage/entropy.py @@ -37,7 +37,9 @@ class EntropyWidget(QWidget): self.data = data self.raw_data = data.file.raw - self.block_size = 1024 + self.block_size = (len(self.raw_data) / 4096) + 1 + if self.block_size < 1024: + self.block_size = 1024 self.width = int(len(self.raw_data) / self.block_size) self.image = QImage(self.width, 1, QImage.Format_ARGB32) self.image.fill(QColor(0, 0, 0, 0)) |
