From 8512862163fd7249a5e6e187eca21232d4eeadcc Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 16 Nov 2007 20:35:30 +0000 Subject: tar: fix a case where glibc detects bogus buffer overrun which is not really there! --- archival/libunarchive/get_header_tar.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'archival/libunarchive') diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c index e8ef92994..bbf088cd8 100644 --- a/archival/libunarchive/get_header_tar.c +++ b/archival/libunarchive/get_header_tar.c @@ -59,8 +59,9 @@ char get_header_tar(archive_handle_t *archive_handle) char chksum[8]; /* 148-155 */ char typeflag; /* 156-156 */ char linkname[100]; /* 157-256 */ - char magic[6]; /* 257-262 */ - char version[2]; /* 263-264 */ + /* POSIX: "ustar" NUL "00" */ + /* GNU tar: "ustar " NUL */ + char magic[8]; /* 257-264 */ char uname[32]; /* 265-296 */ char gname[32]; /* 297-328 */ char devmajor[8]; /* 329-336 */ -- cgit v1.2.3