This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new 0f76053 skip map value with depth limit
0f76053 is described below
commit 0f760537c3f17502e7694c61417dafc02fc3aa3a
Author: 郑桐 <[email protected]>
AuthorDate: Sat Oct 9 16:01:28 2021 +0800
skip map value with depth limit
---
lib/go/thrift/protocol.go | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/go/thrift/protocol.go b/lib/go/thrift/protocol.go
index bd76bcc..8543b5f 100644
--- a/lib/go/thrift/protocol.go
+++ b/lib/go/thrift/protocol.go
@@ -146,7 +146,11 @@ func Skip(ctx context.Context, self TProtocol, fieldType
TType, maxDepth int) (e
if err != nil {
return err
}
- self.Skip(ctx, valueType)
+
+ err = Skip(ctx, self, valueType, maxDepth-1)
+ if err != nil {
+ return err
+ }
}
return self.ReadMapEnd(ctx)
case SET: