Since the first byte is handled separately for the sign bit,
validate that we also get an EOFError if there are a few
bytes but the last one also has the 0x80 bit set.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
for x in [-x for x in values]:
WVPASSEQ(encode_and_decode_vint(x), x)
WVEXCEPT(EOFError, vint.read_vint, BytesIO())
+ WVEXCEPT(EOFError, vint.read_vint, BytesIO(b"\x80\x80"))
def encode_and_decode_bvec(x):