X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/02e8ba352f71b82a936f5034059251425ab183d5..650faab01603caac04494d54cf6b10a65c00ea13:/apt-inst/contrib/arfile.cc diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc index 7c85f2e86..533c563f9 100644 --- a/apt-inst/contrib/arfile.cc +++ b/apt-inst/contrib/arfile.cc @@ -14,13 +14,16 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include #include #include #include - /*}}}*/ + #include + /*}}}*/ struct ARArchive::MemberHeader { @@ -87,7 +90,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 +99,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"));