Jens-G commented on PR #3599:
URL: https://github.com/apache/thrift/pull/3599#issuecomment-4732125522

   > Did you look at list/set as well?
   
   Checked: `ParseElemListBegin` (which serves `ReadListBegin`/`ReadSetBegin`) 
already uses `nSize` — the wire-read value — so list/set are not affected by 
the wrong-variable issue this PR fixes.
   
   However, both `ReadMapBegin` (after this fix) and `ParseElemListBegin` share 
a secondary issue: the `int64` wire value is narrowed to `int32` before 
`checkSizeForProtocol`. Values above `math.MaxInt32` truncate silently; the 
narrowed value may pass the check while the full `int64` is returned in `size`. 
I've pushed one additional commit to this branch that adds the range guard to 
`ReadMapBegin`; the same fix for `ParseElemListBegin` (list/set) is in PR #3601 
(THRIFT-6071).


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

Reply via email to