You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "John Doe (JIRA)" <ji...@apache.org> on 2017/12/04 04:04:00 UTC

[jira] [Created] (HADOOP-15088) BufferedInputStream.skip function can return 0 when the file is corrupted, causing an infinite loop

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