diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-01-26 15:51:45 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-01-26 15:51:45 +0100 |
commit | 51f9f4d78deabf54dbbb6881139d2b1a319ffbfc (patch) | |
tree | 60a2bcd8911acd5c4ab8b4558bfd30344b673ff5 /apt-inst/contrib/arfile.cc | |
parent | 76fe5db7153957f8fda437e3bd614312b076f19e (diff) | |
parent | c1f168f54be5b4babeb9b91cd7145441ea2489ad (diff) |
merge from the mvo branch
Diffstat (limited to 'apt-inst/contrib/arfile.cc')
-rw-r--r-- | apt-inst/contrib/arfile.cc | 6 |
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); } |