summaryrefslogtreecommitdiff
path: root/apt-inst/contrib/arfile.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-01-26 15:51:45 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-01-26 15:51:45 +0100
commit51f9f4d78deabf54dbbb6881139d2b1a319ffbfc (patch)
tree60a2bcd8911acd5c4ab8b4558bfd30344b673ff5 /apt-inst/contrib/arfile.cc
parent76fe5db7153957f8fda437e3bd614312b076f19e (diff)
parentc1f168f54be5b4babeb9b91cd7145441ea2489ad (diff)
merge from the mvo branch
Diffstat (limited to 'apt-inst/contrib/arfile.cc')
-rw-r--r--apt-inst/contrib/arfile.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc
index a1fb97b48..8018f4d30 100644
--- a/apt-inst/contrib/arfile.cc
+++ b/apt-inst/contrib/arfile.cc
@@ -87,7 +87,7 @@ bool ARArchive::LoadHeaders()
StrToNum(Head.Size,Memb->Size,sizeof(Head.Size)) == false)
{
delete Memb;
- return _error->Error(_("Invalid archive member header"));
+ return _error->Error(_("Invalid archive member header %s"), Head.Name);
}
// Check for an extra long name string
@@ -96,7 +96,7 @@ bool ARArchive::LoadHeaders()
char S[300];
unsigned long Len;
if (StrToNum(Head.Name+3,Len,sizeof(Head.Size)-3) == false ||
- Len >= strlen(S))
+ Len >= sizeof(S))
{
delete Memb;
return _error->Error(_("Invalid archive member header"));
@@ -111,7 +111,7 @@ bool ARArchive::LoadHeaders()
else
{
unsigned int I = sizeof(Head.Name) - 1;
- for (; Head.Name[I] == ' '; I--);
+ for (; Head.Name[I] == ' ' || Head.Name[I] == '/'; I--);
Memb->Name = string(Head.Name,I+1);
}