Github user jeking3 commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1326#discussion_r132611000
  
    --- Diff: lib/cpp/src/thrift/transport/TBufferTransports.cpp ---
    @@ -361,9 +361,13 @@ void TMemoryBuffer::ensureCanWrite(uint32_t len) {
       }
     
       // Grow the buffer as necessary.
    -  uint32_t new_size = bufferSize_;
    +  uint64_t new_size = bufferSize_;
       while (len > avail) {
         new_size = new_size > 0 ? new_size * 2 : 1;
    +    if (new_size > std::numeric_limits<uint32_t>::max()) {
    --- End diff --
    
    Shouldn't this be int32_t instead of uint32_t, if we want to test against 
2GB?  Sorry I didn't catch this before.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to