hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Doe (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HADOOP-15088) BufferedInputStream.skip function can return 0 when the file is corrupted, causing an infinite loop
Date Mon, 04 Dec 2017 04:04:00 GMT
John Doe created HADOOP-15088:
---------------------------------

             Summary: BufferedInputStream.skip function can return 0 when the file is corrupted,
causing an infinite loop
                 Key: HADOOP-15088
                 URL: https://issues.apache.org/jira/browse/HADOOP-15088
             Project: Hadoop Common
          Issue Type: Bug
          Components: streaming
    Affects Versions: 2.5.0
            Reporter: John Doe


When a file is corrupted, the skip function can return 0, causing an infinite loop.
Here is the code:

{code:java}
  private boolean slowReadUntilMatch(Pattern markPattern, boolean includePat,
                                     DataOutputBuffer outBufOrNull) throws IOException {
      ...
      for (long skiplen = endPos; skiplen > 0; ) {
        skiplen -= bin_.skip(skiplen); 
      }
      ...
  }
{code}




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

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


Mime
View raw message