Репозитории ALT
S: | 1.35.0.20.1cdad4cc-alt1 |
5.1: | 1.23-alt4 |
4.1: | 1.20-alt1.M41.1 |
4.0: | 1.15.1-alt8 |
3.0: | 1.15.1-alt2 |
+updates: | 1.15.1-alt4.M30.2 |
Группа :: Архивирование/Резервное копирование
Пакет: tar
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: tar-1.15.1-cvs-20050113-name_size.patch
Скачать
Скачать
2005-01-13 Sergey Poznyakoff <gray@Mirddin.farlep.net>
* src/list.c (read_header): Fixed calculation of the
size for GNU long name/link. Tar was reading one block
more if name_size was divisible by 512. Thanks Josef
Bauer.
--- src/list.c 21 Dec 2004 14:44:03 -0000 1.80
+++ src/list.c 13 Jan 2005 15:59:26 -0000 1.81
@@ -378,7 +378,11 @@ read_header (bool raw_extended_headers)
|| header->header.typeflag == GNUTYPE_LONGLINK)
{
size_t name_size = current_stat_info.stat.st_size;
- size = name_size - name_size % BLOCKSIZE + 2 * BLOCKSIZE;
+ size_t n = name_size % BLOCKSIZE;
+ size = name_size + BLOCKSIZE;
+ if (n)
+ size += BLOCKSIZE - n;
+
if (name_size != current_stat_info.stat.st_size
|| size < name_size)
xalloc_die ();