]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debsrcrecords.cc
support long keyid and fingerprint in gpgv's GOODSIG
[apt.git] / apt-pkg / deb / debsrcrecords.cc
index 5454d79c3de9164f0a7d12f842fa69840f7581c6..d296161d6aad203c1dff8ce18fe826f3851b6088 100644 (file)
@@ -73,9 +73,12 @@ const char **debSrcRecordParser::Binaries()
    char* bin = Buffer;
    do {
       char* binStartNext = strchrnul(bin, ',');
-      char* binEnd = binStartNext - 1;
-      for (; isspace_ascii(*binEnd) != 0; --binEnd)
-        binEnd = 0;
+      // Found a comma, clean up any space before it
+      if (binStartNext > Buffer) {
+        char* binEnd = binStartNext - 1;
+        for (; binEnd > Buffer && isspace_ascii(*binEnd) != 0; --binEnd)
+           *binEnd = 0;
+      }
       StaticBinList.push_back(bin);
       if (*binStartNext != ',')
         break;