summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author郑桐 <yuesen.xys@alibaba-inc.com>2021-10-09 16:01:28 +0800
committerJens Geyer <Jens-G@users.noreply.github.com>2021-10-18 23:00:55 +0200
commit0f760537c3f17502e7694c61417dafc02fc3aa3a (patch)
tree7a8861bd74cc760bbb27906acc6a099b0d143a0e
parent6a7278b9db78777f146b09fdfe42eb342faec171 (diff)
downloadthrift-0f760537c3f17502e7694c61417dafc02fc3aa3a.tar.gz
skip map value with depth limit
-rw-r--r--lib/go/thrift/protocol.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/go/thrift/protocol.go b/lib/go/thrift/protocol.go
index bd76bcc7d..8543b5fd0 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: