From bf1c1ababc6c1cb8674d8027c09f1fd96f397550 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 16 Mar 2011 00:04:44 +1100 Subject: [PATCH] Support correct seeking when doing get_fileinfo on encrypted archives. --- lrzip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lrzip.c b/lrzip.c index 0539f95..18e6c95 100644 --- a/lrzip.c +++ b/lrzip.c @@ -837,6 +837,8 @@ next_chunk: } while (last_head); ++stream; } + if (ENCRYPT && c_len % CBC_LEN) + c_len += CBC_LEN - (c_len % CBC_LEN); if (unlikely((ofs = lseek(fd_in, c_len, SEEK_CUR)) == -1)) fatal("Failed to lseek c_len in get_fileinfo\n"); /* Chunk byte entry */