The following commit has been merged in the master branch:
commit e6b62bd49fe7a089dc5f294090130051e7de54fe
Author: Guillem Jover <[email protected]>
Date: Wed Jul 28 01:00:59 2010 +0200
libdpkg: When decoding the tar header assign the TarInfo Type first
diff --git a/lib/dpkg/tarfn.c b/lib/dpkg/tarfn.c
index 000f491..1711bba 100644
--- a/lib/dpkg/tarfn.c
+++ b/lib/dpkg/tarfn.c
@@ -128,6 +128,8 @@ DecodeTarHeader(char *block, struct TarInfo *d)
else
d->format = tar_format_old;
+ d->Type = (enum tar_filetype)h->LinkFlag;
+
if (*h->UserName)
passwd = getpwnam(h->UserName);
if (*h->GroupName)
@@ -149,7 +151,6 @@ DecodeTarHeader(char *block, struct TarInfo *d)
checksum = OtoL(h->Checksum, sizeof(h->Checksum));
d->UserID = (uid_t)OtoL(h->UserID, sizeof(h->UserID));
d->GroupID = (gid_t)OtoL(h->GroupID, sizeof(h->GroupID));
- d->Type = (enum tar_filetype)h->LinkFlag;
if (passwd)
d->UserID = passwd->pw_uid;
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]