wok view busybox/stuff/busybox-1.10.1-header_tar.u @ rev 1917

Add perl-unicode-map8
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Dec 22 09:12:54 2008 +0000 (2008-12-22)
parents
children
line source
1 --- busybox-1.10.1/archival/libunarchive/get_header_tar.c
2 +++ busybox-1.10.1/archival/libunarchive/get_header_tar.c
3 @@ -24,18 +24,20 @@
4 };
5 #endif
7 -/* NB: _DESTROYS_ str[len] character! */
8 static unsigned long long getOctal(char *str, int len)
9 {
10 unsigned long long v;
11 + char last;
12 /* Actually, tar header allows leading spaces also.
13 * Oh well, we will be liberal and skip this...
14 * The only downside probably is that we allow "-123" too :)
15 if (*str < '0' || *str > '7')
16 bb_error_msg_and_die("corrupted octal value in tar header");
17 */
18 + last = str[len];
19 str[len] = '\0';
20 v = strtoull(str, &str, 8);
21 + str[len] = last;
22 if (*str && (!ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY || *str != ' '))
23 bb_error_msg_and_die("corrupted octal value in tar header");
24 return v;