From cfc212cdfff27c6a7b9d9743f87c4da70f97558c Mon Sep 17 00:00:00 2001 From: Etienne Le Sueur Date: Sat, 9 Jun 2012 08:37:05 +0200 Subject: tar: fix 256-bit encoded number decoding Signed-off-by: Etienne Le Sueur Signed-off-by: Denys Vlasenko --- archival/libarchive/get_header_tar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archival/libarchive/get_header_tar.c b/archival/libarchive/get_header_tar.c index 80a709144..b168653d8 100644 --- a/archival/libarchive/get_header_tar.c +++ b/archival/libarchive/get_header_tar.c @@ -84,7 +84,7 @@ static unsigned long long getOctal(char *str, int len) first >>= 1; /* now 7th bit = 6th bit */ v = first; /* sign-extend 8 bits to 64 */ while (--len != 0) - v = (v << 8) + (unsigned char) *str++; + v = (v << 8) + (uint8_t) *++str; } return v; } -- cgit v1.2.3