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

   ### Code review
   
   Found 2 issues:
   
   1. `static_cast<long>` and `(glong)` are 32-bit on Windows/MSVC (LLP64 data 
model), the same width as `int`, so the multiplication still overflows there. 
The fix works on POSIX (LP64) where `long` is 64-bit, but not on Windows. Use 
`int64_t`/`gint64` instead (and update `TTransport::checkReadBytesAvailable`'s 
signature accordingly).
   
   
https://github.com/apache/thrift/blob/068af367eea9bc63878eae19f2a4d2ef76daefcb/lib/cpp/src/thrift/protocol/TBinaryProtocol.h#L175-L192
   
   The same pattern appears in `TCompactProtocol.h`, `TJSONProtocol.h`, 
`TProtocol.h`, `thrift_binary_protocol.c`, and `thrift_compact_protocol.c`.
   
   2. PR title and commit message are missing the required `THRIFT-NNNN:` 
prefix and `Client: cpp,c_glib` trailer required by [AGENTS.md 
ยง2](https://github.com/apache/thrift/blob/445c062e3ac745a2841962002a8ec1e8f41320e8/AGENTS.md#L24-L40)
 for non-trivial changes. Please file a JIRA ticket at 
https://issues.apache.org/jira/browse/THRIFT and update the PR title and commit 
message.
   
   ๐Ÿค– Generated with [Claude Code](https://claude.ai/code)
   
   <sub>- If this code review was useful, please react with ๐Ÿ‘. Otherwise, react 
with ๐Ÿ‘Ž.</sub>


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