diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-10-17 14:48:14 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-10-17 14:48:14 +0200 |
| commit | 0fdfb66da47b905b07bdf1787e410ae94f76a2e8 (patch) | |
| tree | b34b27f5a5cd15189f22f1dfd9740701c7325cc4 /miasm/loader/pe_init.py | |
| parent | 9a3e1694c579961f4b102b03d1d17ab2cabb6505 (diff) | |
| download | focaccia-miasm-0fdfb66da47b905b07bdf1787e410ae94f76a2e8.tar.gz focaccia-miasm-0fdfb66da47b905b07bdf1787e410ae94f76a2e8.zip | |
Fix python2/python3 bytes manipulation
Diffstat (limited to 'miasm/loader/pe_init.py')
| -rw-r--r-- | miasm/loader/pe_init.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/miasm/loader/pe_init.py b/miasm/loader/pe_init.py index 2d7e3fa1..74192849 100644 --- a/miasm/loader/pe_init.py +++ b/miasm/loader/pe_init.py @@ -161,7 +161,7 @@ def compute_crc(raw, olds): out = 0 data = raw[:] if len(raw) % 2: - end = struct.unpack('B', data[-1])[0] + end = struct.unpack('B', data[-1:])[0] data = data[:-1] if (len(raw) & ~0x1) % 4: out += struct.unpack('H', data[:2])[0] |