You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2021/10/18 21:01:04 UTC

[thrift] branch master updated: skip map value with depth limit

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: 郑桐 <yu...@alibaba-inc.com>
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: