diff options
-rw-r--r-- | test/codec/ber/test_decoder.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/codec/ber/test_decoder.py b/test/codec/ber/test_decoder.py index ec58bde..72ed77f 100644 --- a/test/codec/ber/test_decoder.py +++ b/test/codec/ber/test_decoder.py @@ -382,6 +382,14 @@ class RealDecoderTestCase(unittest.TestCase): else: assert 0, 'wrong tagFormat worked out' + def testShortEncoding(self): + try: + decoder.decode(ints2octs((9, 1, 131))) + except PyAsn1Error: + pass + else: + assert 0, 'accepted too-short real' + class SequenceDecoderTestCase(unittest.TestCase): def setUp(self): self.s = univ.Sequence(componentType=namedtype.NamedTypes( |