You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by GitBox <gi...@apache.org> on 2022/05/11 16:02:52 UTC
[GitHub] [thrift] fishy commented on pull request #2605: THRIFT-5569: Fix size check in TCompactProtocol.ReadListBegin
fishy commented on PR #2605:
URL: https://github.com/apache/thrift/pull/2605#issuecomment-1123967231
> By checking error we are sure size is not negative now? Not sure if I getr the idea right.
`checkSizeForProtocol` checks both that size is negative and size is too large (> max size allowed), and returns the proper TProtocolException if either case is true: https://github.com/apache/thrift/blob/dae1437ca03834527b654cf5bc8d7f41c9412a20/lib/go/thrift/configuration.go#L305-L319
it's used in all of `T{Binary|Compact|JSON}Protocol.Read{Map|List|Set}Begin`, just that for `TCompactProtocol.ReadListBegin` we have a bug that we checked the wrong size (`size32` here is actually a const, not the size we read from the container).
--
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: notifications-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org