mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
(tar_from_header): reword to avoid a cast to unsigned char.
Sync with GNU tar b201a3742162adcb2cf1e9618c4c4f4db0d239ae. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
b6483b8a47
commit
aadedc361d
@ -432,12 +432,18 @@ tar_from_header (const char *where0, size_t digs, char const *type, intmax_t min
|
||||
/* Parse base-64 output produced only by tar test versions
|
||||
1.13.6 (1999-08-11) through 1.13.11 (1999-08-23).
|
||||
Support for this will be withdrawn in future tar releases. */
|
||||
int dig;
|
||||
|
||||
negative = *where++ == '-';
|
||||
|
||||
while (where != lim && (dig = base64_map[(unsigned char) *where]) < 64)
|
||||
while (where != lim)
|
||||
{
|
||||
unsigned char uc = *where;
|
||||
int dig;
|
||||
|
||||
dig = base64_map[uc];
|
||||
if (64 <= dig)
|
||||
break;
|
||||
|
||||
if (ckd_mul (&value, value, 64))
|
||||
return (-1);
|
||||
value |= dig;
|
||||
|
Loading…
Reference in New Issue
Block a user