John Doe created HIVE-18219: ------------------------------- Summary: When InputStream is corrupted, the skip() returns -1, causing infinite loop Key: HIVE-18219 URL: https://issues.apache.org/jira/browse/HIVE-18219 Project: Hive Issue Type: Bug Affects Versions: 2.3.2 Reporter: John Doe
Similar like [CASSANDRA-7330|https://issues.apache.org/jira/browse/CASSANDRA-7330], when InputStream is corrupted, skip() returns -1, causing the following loop be infinite. {code:java} public final int skipBytes(int count) throws IOException { int skipped = 0; long skip; while (skipped < count && (skip = in.skip(count - skipped)) != 0) { skipped += skip; } if (skipped < 0) { throw new EOFException(); } return skipped; } {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)