[GitHub] thrift pull request #1325: THRIFT-3821: Check for overflow on buffer resize ...

2017-08-03 Thread asuhan
GitHub user asuhan opened a pull request: https://github.com/apache/thrift/pull/1325 THRIFT-3821: Check for overflow on buffer resize in TMemoryBuffer Going over 2 GB is quite possible when using Thrift for serialization. We can detect the condition and throw an exception. You can

[GitHub] thrift pull request #1325: THRIFT-3821: Check for overflow on buffer resize ...

2017-08-03 Thread asuhan
Github user asuhan closed the pull request at: https://github.com/apache/thrift/pull/1325 --- 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

[GitHub] thrift pull request #1326: THRIFT-3821

2017-08-03 Thread asuhan
GitHub user asuhan opened a pull request: https://github.com/apache/thrift/pull/1326 THRIFT-3821 Going over 2 GB is quite possible when using Thrift for serialization. We can detect the condition and throw an exception. You can merge this pull request into a Git repository by

[GitHub] thrift issue #1326: THRIFT-3821

2017-08-10 Thread asuhan
Github user asuhan commented on the issue: https://github.com/apache/thrift/pull/1326 Thanks for the review, I'll address both. It's my preference to squash the commits as well, sounds like I've misinterpreted https://thrift.apache.org/docs/HowToContribute (it says

[GitHub] thrift issue #1326: THRIFT-3821

2017-08-10 Thread asuhan
Github user asuhan commented on the issue: https://github.com/apache/thrift/pull/1326 I've disabled the test for Windows since allocating 1GB on 32-bit is likely to fail with `bad_alloc`. Test failure looks unrelated, also got a clean run before: https://travis-ci.org/a

[GitHub] thrift pull request #1326: THRIFT-3821

2017-08-10 Thread asuhan
Github user asuhan commented on a diff in the pull request: https://github.com/apache/thrift/pull/1326#discussion_r132612265 --- Diff: lib/cpp/src/thrift/transport/TBufferTransports.cpp --- @@ -361,9 +361,13 @@ void TMemoryBuffer::ensureCanWrite(uint32_t len

[GitHub] thrift pull request #1326: THRIFT-3821

2017-08-10 Thread asuhan
Github user asuhan commented on a diff in the pull request: https://github.com/apache/thrift/pull/1326#discussion_r132612556 --- Diff: lib/cpp/test/TMemoryBufferTest.cpp --- @@ -117,4 +117,17 @@ BOOST_AUTO_TEST_CASE(test_exceptions) { BOOST_CHECK_NO_THROW(buf2.write((const

[GitHub] thrift pull request #1326: THRIFT-3821

2017-08-10 Thread asuhan
Github user asuhan commented on a diff in the pull request: https://github.com/apache/thrift/pull/1326#discussion_r132613779 --- Diff: lib/cpp/src/thrift/transport/TBufferTransports.cpp --- @@ -361,9 +361,13 @@ void TMemoryBuffer::ensureCanWrite(uint32_t len

[GitHub] thrift issue #1326: THRIFT-3821

2017-08-12 Thread asuhan
Github user asuhan commented on the issue: https://github.com/apache/thrift/pull/1326 Are there any additional changes I should make to this pull request? As I've said in the inline comment, I believe comparing to `std::numeric_limits::max()` is actually consistent with wha