Use a capped string length instead of using last namevalue length
member when printing the disallowed value when parsing.
+2008-07-02 Guillem Jover <guillem@debian.org>
+
+ * lib/fields.c (convert_string): Use a capped string length instead
+ of using last namevalue length member when printing the disallowed
+ value.
+
2008-07-02 Guillem Jover <guillem@debian.org>
* src/query.c (limiteddescription): Use NULL instead of 0.
* Do not allocate memory when lstat fails during package upgrade.
* Properly lstat the correct file when using --root on package upgrade.
Thanks to Egmont Koblinger. Closes: #281057
+ * Print a longer string when a disallowed field value is found when parsing.
[ Raphael Hertzog ]
* Enhance dpkg-shlibdeps's error message when a library can't be found to
#include <stdio.h>
#include <ctype.h>
#include <string.h>
+#include "strnlen.h"
#include <dpkg.h>
#include <dpkg-db.h>
if (!nvip->name) {
if (otherwise != -1) return otherwise;
parse_error(filename, lno, pigp, _("`%.*s' is not allowed for %s"),
- l > 50 ? 50 : l, startp, what);
+ strnlen(startp, 50), startp, what);
}
ep = startp + l;
c = *ep;