public void MaliciousRecursion()
        {
            ByteString data64 = MakeRecursiveMessage(64).ToByteString();
            ByteString data65 = MakeRecursiveMessage(65).ToByteString();

            AssertMessageDepth(TestRecursiveMessage.Parser.ParseFrom(data64), 64);

            Assert.Throws <InvalidProtocolBufferException>(() => TestRecursiveMessage.Parser.ParseFrom(data65));

            CodedInputStream input = data64.CreateCodedInput();

            input.SetRecursionLimit(8);
            Assert.Throws <InvalidProtocolBufferException>(() => TestRecursiveMessage.Parser.ParseFrom(input));
        }