#!/usr/bin/env python
# coding: utf-8
# PyDERASN -- Python ASN.1 DER/BER codec with abstract structures
-# Copyright (C) 2017-2018 Sergey Matveev <stargrave@stargrave.org>
+# Copyright (C) 2017-2019 Sergey Matveev <stargrave@stargrave.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
arc = 0
while True:
octet = indexbytes(v, i)
+ if i == 0 and octet == 0x80 and not ctx.get("bered", False):
+ raise DecodeError("non normalized arc encoding")
arc = (arc << 7) | (octet & 0x7F)
if octet & 0x80 == 0:
arcs.append(arc)