]> git.saurik.com Git - apt.git/commitdiff
[apt-inst/contrib/arfile.cc] use sizeof instead strlen
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sun, 9 Aug 2009 08:22:53 +0000 (10:22 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sun, 9 Aug 2009 08:22:53 +0000 (10:22 +0200)
Patch from Marius Vollmer, thanks! (Closes: #504325)

apt-inst/contrib/arfile.cc
debian/changelog

index 7c85f2e866282cf52ae9fcb0a9472348bf3825f8..e6c63d1ab5f03fe1e70fe2c4aab383adcd4b7293 100644 (file)
@@ -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"));
index fd6f853e0ec4f90128aef5f056e4a8b7df6a3439..841661c5a3fe4393455de5ed221d133cc973e8aa 100644 (file)
@@ -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: