You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "brumi1024 (via GitHub)" <gi...@apache.org> on 2023/07/27 14:46:55 UTC

[GitHub] [hadoop] brumi1024 commented on pull request #5895: MAPREDUCE-7446. Fix NegativeArraySizeException in IFile's readRawValue method

brumi1024 commented on PR #5895:
URL: https://github.com/apache/hadoop/pull/5895#issuecomment-1653771314

   > `// Read key and value lengths currentKeyLength = WritableUtils.readVInt(dIn); currentValueLength = WritableUtils.readVInt(dIn); bytesRead += WritableUtils.getVIntSize(currentKeyLength) + WritableUtils.getVIntSize(currentValueLength);`
   > 
   > bytesRead can overflow as well.
   
   There are a lot of long = int + int type operations, which will overflow, as there is no widening happening. Since we use these as readLength this can result in strange bugs, so probably those should be rewritten.


-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org