diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2009-08-09 10:22:53 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2009-08-09 10:22:53 +0200 |
commit | 472e2c3aa9c8ea38c2b5f0639bdb09eadb7ffca4 (patch) | |
tree | d2413340e76641ec7ac1c66ece15367513100ffd | |
parent | f64196e879103151f3b90ba423dc74ef61ea8c76 (diff) |
[apt-inst/contrib/arfile.cc] use sizeof instead strlen
Patch from Marius Vollmer, thanks! (Closes: #504325)
-rw-r--r-- | apt-inst/contrib/arfile.cc | 2 | ||||
-rw-r--r-- | debian/changelog | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc index 7c85f2e86..e6c63d1ab 100644 --- a/apt-inst/contrib/arfile.cc +++ b/apt-inst/contrib/arfile.cc @@ -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")); diff --git a/debian/changelog b/debian/changelog index fd6f853e0..841661c5a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ apt (0.7.22.3) unstable; urgency=low (by Luca Bruno, Closes: #223712) * doc/apt.conf.5.xml: - mention the apt.conf.d dir (by Vincent McIntyre, Closes: #520831) + * apt-inst/contrib/arfile.cc: + - use sizeof instead strlen (by Marius Vollmer, Closes: #504325) [ George Danchev ] * cmdline/apt-cache.cc: |