songwanging created APEXMALHAR-2551:
---------------------------------------

             Summary: Potential Integer Overflow
                 Key: APEXMALHAR-2551
                 URL: https://issues.apache.org/jira/browse/APEXMALHAR-2551
             Project: Apache Apex Malhar
          Issue Type: Bug
    Affects Versions: 3.8.0
            Reporter: songwanging
            Priority: Minor


Our tool DeepTect has detected a potential integer overflow:
Path: 
apex-malhar/library/src/main/java/com/datatorrent/lib/io/fs/Synchronizer.java

{code:java}
long bytesRemainingToRead = length;
int bytesToread = Math.min(BUFFER_SIZE, (int)bytesRemainingToRead);
{code}

In the above code snippet, "bytesRemainingToRead " is a long variable, if it is 
super large, directly casting "bytesRemainingToRead" into integer will 
definitely lead to a potential integer overflow.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to