mhlakhani commented on code in PR #3151:
URL: https://github.com/apache/thrift/pull/3151#discussion_r2112712211
##########
lib/go/thrift/json_protocol.go:
##########
@@ -314,11 +314,14 @@ func (p *TJSONProtocol) ReadMapBegin(ctx context.Context)
(keyType TType, valueT
if err != nil {
return keyType, valueType, size, err
}
- err = checkSizeForProtocol(int32(iSize), p.cfg)
+ size = int(iSize)
+
+ minElemSize := p.getMinSerializedSize(keyType) +
p.getMinSerializedSize(valueType)
Review Comment:
ahh that's a good catch. Open to interpretation on how to fix this, I think
I didn't want to deviate too much from existing code structure. This is
tightening the lower bound. Because, at this time it also doesn't consider e.g.
quoting/spacing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]