Truncate extra byte when extracting OMF payloads

This commit is contained in:
RichardG867
2022-04-14 17:46:20 -03:00
parent df87fe9a89
commit dbc55e98c9

View File

@@ -1751,6 +1751,11 @@ class OMFExtractor(Extractor):
data = in_f.read(1048576)
out_f.write(data)
# Truncate payloads with an extra byte.
pos = out_f.tell()
if pos & 1:
out_f.truncate(pos - 1)
out_f.close()
except:
in_f.close()