dcelasun commented on a change in pull request #2296:
URL: https://github.com/apache/thrift/pull/2296#discussion_r559158877



##########
File path: lib/go/thrift/header_protocol.go
##########
@@ -34,76 +34,65 @@ type THeaderProtocol struct {
 
        // Will be initialized on first read/write.
        protocol TProtocol
+
+       cfg *TConfiguration
+}
+
+// Deprecated: Use NewTHeaderProtocolConf instead.
+func NewTHeaderProtocol(trans TTransport) *THeaderProtocol {
+       return newTHeaderProtocolConf(trans, &TConfiguration{
+               noPropagation: true,
+       })
 }
 
-// NewTHeaderProtocol creates a new THeaderProtocol from the underlying
-// transport with default protocol ID.
+// NewTHeaderProtocolConf creates a new THeaderProtocol from the underlying
+// transport with gien TConfiguration.

Review comment:
       ```suggestion
   // transport with given TConfiguration.
   ```

##########
File path: lib/go/thrift/framed_transport.go
##########
@@ -155,7 +189,7 @@ func (p *TFramedTransport) readFrame() error {
                return err
        }
        size := binary.BigEndian.Uint32(buf)
-       if size < 0 || size > p.maxLength {
+       if size < 0 || size > uint32(p.cfg.GetMaxFrameSize()) {

Review comment:
       I very much doubt this is a legitimate possibility, `int32` seems fine 
to me.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to