Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.0.0
-
None
-
None
-
None
Description
Similar to the SerializationUtils.readLongBE() function reported in HIVE-13397, when Instream is corrupted, the following loop can become infinite, too.
private void readRemainingLongs(long[] buffer, int offset, InStream input, int remainder, int numBytes) throws IOException { final int toRead = remainder * numBytes; // bulk read to buffer int bytesRead = input.read(readBuffer, 0, toRead); while (bytesRead != toRead) { bytesRead += input.read(readBuffer, bytesRead, toRead - bytesRead); } ... }