Просмотр исходного кода

Allow spaces between the end of a version, and the trailing ')'.

Adam Heath лет назад: 24
Родитель
Сommit
352a6a6330
3 измененных файлов с 8 добавлено и 1 удалено
  1. 5 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 1 1
      lib/fields.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+Sat Aug 24 14:41:45 CDT 2002 Adam Heath <doogie@debian.org>
+
+  * lib/fields.c: Allow spaces between the end of a version, and the
+    trailing ')'.
+
 Sat Aug 24 14:16:13 CDT 2002 Adam Heath <doogie@debian.org>
 
   * lib/archives.c: Fix segfault when --auto-deconfigure is given.  This is

+ 2 - 0
debian/changelog

@@ -7,6 +7,8 @@ dpkg (1.10.5) unstable; urgency=low
   * Fix read past buffer in lib/nfmalloc.c.  Closes: #157304.
   * Fix several read pass buffer bugs, and a memleak.  Closes: #155362.
   * Fix segfault when --auto-deconfigure is given.  Closes: #157762.
+  * Allow spaces between the end of a version, and the trailing ')'.
+    Closes: #154898.
 
  -- Adam Heath <doogie@debian.org>  UNRELEASED
 

+ 1 - 1
lib/fields.c

@@ -375,6 +375,7 @@ void f_dependency(struct pkginfo *pigp, struct pkginfoperfile *pifp,
           if (isspace(*p)) break;
           p++;
         }
+	versionlength= p - versionstart;
         while (isspace(*p)) p++;
         if (*p == '(') parseerr(NULL,filename,lno, warnto,warncount,pigp,0,
                                 _("`%s' field, reference to `%.255s': "
@@ -385,7 +386,6 @@ void f_dependency(struct pkginfo *pigp, struct pkginfoperfile *pifp,
         else if (*p == 0) parseerr(NULL,filename,lno, warnto,warncount,pigp,0,
                                    _("`%s' field, reference to `%.255s': "
                                    "version unterminated"),fip->name,depname);
-	versionlength= p - versionstart;
 	if (versionlength >=  versionused) {
 	  versionused= versionlength;
 	  version= realloc(version,versionlength+1);