dongjoon-hyun commented on a change in pull request #941: URL: https://github.com/apache/orc/pull/941#discussion_r736175281
########## File path: java/tools/src/java/org/apache/orc/tools/FileDump.java ########## @@ -470,17 +476,30 @@ private static void recoverFiles(final List<String> corruptFiles, final Configur List<Long> footerOffsets = new ArrayList<>(); // start reading the data file form top to bottom and record the valid footers - while (remaining > 0) { - int toRead = (int) Math.min(DEFAULT_BLOCK_SIZE, remaining); - byte[] data = new byte[toRead]; + while (remaining > 0 && corruptFileLen > (2L * magicLength)) { Review comment: So, we don't care a tiny file whose size is less than 2 * magicLength because the correct ORC has at least two MAGIC strings? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@orc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org