[
https://issues.apache.org/jira/browse/HIVE-18142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stamatis Zampetakis updated HIVE-18142:
---------------------------------------
Fix Version/s: (was: 2.1.0)
(was: 2.0.1)
I cleared the fixVersion field since this ticket is still open. Please review
this ticket and if the fix is already committed to a specific version please
set the version accordingly and mark the ticket as RESOLVED.
According to the [JIRA
guidelines|https://cwiki.apache.org/confluence/display/Hive/HowToContribute]
the fixVersion should be set only when the issue is resolved/closed.
> Data corruption can cause SerializationUtils.readRemainingLongs() function
> hang
> -------------------------------------------------------------------------------
>
> Key: HIVE-18142
> URL: https://issues.apache.org/jira/browse/HIVE-18142
> Project: Hive
> Issue Type: Bug
> Affects Versions: 1.0.0
> Reporter: John Doe
> Priority: Major
>
> Similar to the SerializationUtils.readLongBE() function reported in
> [HIVE-13397|https://issues.apache.org/jira/browse/HIVE-13397], when Instream
> is corrupted, the following loop can become infinite, too.
> {code:java}
> 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);
> }
> ...
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)