PE binaries included in the driver package (.sys, .dll, etc) may contain no internal signatures; in that case their digest in the catalog is calculated till the end of the file. Signed-off-by: Roman Kagan <rkagan@xxxxxxxxxxxxx> --- util/cpdrivers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/cpdrivers.py b/util/cpdrivers.py index 305b3ae..f4b1d6e 100644 --- a/util/cpdrivers.py +++ b/util/cpdrivers.py @@ -65,6 +65,8 @@ def calcPEHash(data, hashobj): 0x20b: 168 # PE32+ }[pemagic] sec, seclen = struct.unpack_from("2I", data, secdir) + if sec == 0: + sec = len(data) # signature is always the tail part assert sec + seclen == len(data) -- 2.5.0 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list