[SCM] dpkg's main repository branch, sid, updated. 1.16.0.2-2-gbd1d6cd

2011-05-04 Thread Guillem Jover
The following commit has been merged in the sid branch:
commit bd1d6cd247f8e5eb7f2465c0d686cba363c64a57
Author: Guillem Jover 
Date:   Wed May 4 10:01:44 2011 +0200

Release 1.16.0.3

diff --git a/debian/changelog b/debian/changelog
index 854972c..db016b3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-dpkg (1.16.0.3) UNRELEASED; urgency=low
+dpkg (1.16.0.3) unstable; urgency=medium
 
   * Allow again Priority field values not known to dpkg. Regression
 introduced in 1.16.0.
 
- -- Guillem Jover   Wed, 04 May 2011 09:39:09 +0200
+ -- Guillem Jover   Wed, 04 May 2011 10:01:30 +0200
 
 dpkg (1.16.0.2) unstable; urgency=high
 

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, sid, updated. 1.16.0.2-2-gbd1d6cd

2011-05-04 Thread Guillem Jover
The following commit has been merged in the sid branch:
commit d84b36a81088721b340e52664aa2c3379fea2a9a
Author: Guillem Jover 
Date:   Wed May 4 09:41:37 2011 +0200

libdpkg: Allow again unknown Priority field values

The code was not properly advancing the end of the value string when
reaching the fallback case (on values not known for the Priority field),
and the validation for junk after the first word was failing on the
actual first word.

This change reverts to the previous behaviour of blindly accepting the
whole value string for a field, regardless of it being multiword, when
it's the fallback case.

Regression introduced in commit b3f669039f128d715ac7ac71abaeac86f0954112.

Analysis-by: Raphaƫl Hertzog 
Analysis-by: Guillem Jover 

diff --git a/debian/changelog b/debian/changelog
index 5fe55fe..854972c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+dpkg (1.16.0.3) UNRELEASED; urgency=low
+
+  * Allow again Priority field values not known to dpkg. Regression
+introduced in 1.16.0.
+
+ -- Guillem Jover   Wed, 04 May 2011 09:39:09 +0200
+
 dpkg (1.16.0.2) unstable; urgency=high
 
   * Fix dpkg-split --auto to not fail when opening the new depot file.
diff --git a/lib/dpkg/fields.c b/lib/dpkg/fields.c
index 4376581..b56dc1e 100644
--- a/lib/dpkg/fields.c
+++ b/lib/dpkg/fields.c
@@ -48,9 +48,14 @@ parse_nv_next(struct parsedb_state *ps, const struct pkginfo 
*pigp,
   if (nv == NULL)
 parse_error(ps, pigp, _("'%.50s' is not allowed for %s"), str_start, what);
 
-  str_end = str_start + nv->length;
-  while (isspace(str_end[0]))
-str_end++;
+  /* We got the fallback value, skip further string validation. */
+  if (nv->length == 0) {
+str_end = NULL;
+  } else {
+str_end = str_start + nv->length;
+while (isspace(str_end[0]))
+  str_end++;
+  }
   *strp = str_end;
 
   return nv->value;
@@ -64,7 +69,7 @@ parse_nv_last(struct parsedb_state *ps, const struct pkginfo 
*pkg,
   int value;
 
   value = parse_nv_next(ps, pkg, what, nv_head, &str);
-  if (str[0] != '\0')
+  if (str != NULL && str[0] != '\0')
 parse_error(ps, pkg, _("junk after %s"), what);
 
   return value;

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org