These are just bogus, and should have never been accepted.
@@ -107,6 +107,7 @@ dpkg (1.17.2) UNRELEASED; urgency=low
a theoretical problem where a package could get appended to be removed,
then reinstalled as a new version, to get removed again when revisiting
the array in a subsequent package processing. Closes: #726112
+ * Do not accept empty field names in dpkg.
[ Updated programs translations ]
* German (Sven Joachim).
@@ -581,6 +581,8 @@ parse_stanza(struct parsedb_state *ps, struct field_state *fs,
while (!parse_EOF(ps) && !isspace(c) && c != ':' && c != MSDOS_EOF_CHAR)
c = parse_getc(ps);
fs->fieldlen = ps->dataptr - fs->fieldstart - 1;
+ if (fs->fieldlen == 0)
+ parse_error(ps, _("empty field name"));
/* Skip spaces before ‘:’. */
while (!parse_EOF(ps) && c != '\n' && isspace(c))