The following commit has been merged in the master branch:
commit 21e9a2d3ce24bee668d1d108752c8d2fd6dc8f8b
Author: Guillem Jover <[email protected]>
Date:   Sat Feb 19 19:34:56 2011 +0100

    libdpkg: Use format precision instead of strnlen() in convert_string()

diff --git a/lib/dpkg/fields.c b/lib/dpkg/fields.c
index e1f650e..5ebd8b0 100644
--- a/lib/dpkg/fields.c
+++ b/lib/dpkg/fields.c
@@ -47,8 +47,7 @@ convert_string(struct parsedb_state *ps, const struct pkginfo 
*pigp,
   nvip = namevalue_find_by_name(ivip, startp);
   if (nvip == NULL) {
     if (otherwise != -1) return otherwise;
-    parse_error(ps, pigp, _("`%.*s' is not allowed for %s"),
-                (int)strnlen(startp, 50), startp, what);
+    parse_error(ps, pigp, _("'%.50s' is not allowed for %s"), startp, what);
   }
 
   ep = startp + nvip->length;

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to