From f15c51c6801345b7de31d8ffd216104b6f49f2c5 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Wed, 15 Sep 2021 17:45:10 +0100 Subject: [PATCH] zc_utils.py: restore 2^64 - 1 test vector. Signed-off-by: Daira Hopwood --- zc_utils.py | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 zc_utils.py diff --git a/zc_utils.py b/zc_utils.py old mode 100644 new mode 100755 index 2ba5781..e730ba5 --- a/zc_utils.py +++ b/zc_utils.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 import struct def write_compact_size(n): @@ -60,6 +61,7 @@ test_round_trip(0x010001, b'\xFE\x01\x00\x01\x00') test_round_trip(0xFFFFFFFE, b'\xFE\xFE\xFF\xFF\xFF') test_round_trip(0xFFFFFFFF, b'\xFE\xFF\xFF\xFF\xFF') test_round_trip(0x0100000000, b'\xFF\x00\x00\x00\x00\x01\x00\x00\x00') +test_round_trip(0xFFFFFFFFFFFFFFFF, b'\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF') assert_parse_fails(b'\xFD\xFC\x00') assert_parse_fails(b'\xFE\xFF\xFF\x00\x00')