Dimitris Tsirogiannis has posted comments on this change.

Change subject: IMPALA-3494: Fix Thrift TMemoryBuffer overflow
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/3149/1/source/thrift/thrift-0.9.0-patches/0005-IMPALA-3494-fix-Thrift-TMemoryBuffer-overflow.patch
File 
source/thrift/thrift-0.9.0-patches/0005-IMPALA-3494-fix-Thrift-TMemoryBuffer-overflow.patch:

Line 9: >
Shouldn't it be >=?


Line 10: TMemoryBuffer reached 2 GB, unable to expand
That error message is not accurate because buffer_ hasn't increased yet. The 
purpose of this function is to check if the write of size 'len' can be 
performed. So, the error message should indicate that along with a reason why 
this happened.


Line 15:  
nit: remove extra space


Line 22: bufferSize_ = new_size;
       :  
       : -  ptrdiff_t offset = (uint8_t*)new_buffer - buffer_;
       : -  buffer_ += offset;
       : -  rBase_ += offset;
       : -  rBound_ += offset;
       : -  wBase_ += offset;
       : -  wBound_ = buffer_ + bufferSize_;
Why did you change that?


-- 
To view, visit http://gerrit.cloudera.org:8080/3149
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I91086ed9d0b4f95b5532de67fe35b46b748ad16c
Gerrit-PatchSet: 1
Gerrit-Project: Toolchain
Gerrit-Branch: master
Gerrit-Owner: Huaisi Xu <[email protected]>
Gerrit-Reviewer: Dimitris Tsirogiannis <[email protected]>
Gerrit-HasComments: Yes

Reply via email to