From: Adam Heath Date: Sat, 13 Sep 2003 19:37:01 +0000 (+0000) Subject: Fix inverted test of eof in parsedb, while looking for eof after field X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83e5ce9c7bf9e8f8efa20d9c9b79405884efb419;p=dpkg Fix inverted test of eof in parsedb, while looking for eof after field name. --- diff --git a/ChangeLog b/ChangeLog index be8736b1..61847e84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Sep 13 14:36:37 CDT 2003 Adam Heath + + * lib/parse.c: Fix inverted test of eof in parsedb, while looking for eof + after field name. + Sat Sep 13 14:34:10 CDT 2003 Adam Heath * scripts/update-alternatives.pl: Fix inversion test of $state against diff --git a/debian/changelog b/debian/changelog index f7c8ed25..0334fd34 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,9 @@ dpkg (1.10.11) unstable; urgency=low * Sebastian Ley : Fix inversion test of $state against 'expected' when removing an alternative. Closes: #203791. + * Andrew Suffield : + Fix inverted test of eof in parsedb, while looking for eof after + field name. Closes: #198218 -- Wichert Akkerman UNRELEASED diff --git a/lib/parse.c b/lib/parse.c index 1e84f948..11165f44 100644 --- a/lib/parse.c +++ b/lib/parse.c @@ -142,7 +142,7 @@ int parsedb(const char *filename, enum parsedbflags flags, while (!EOF_mmap(dataptr, endptr) && !isspace(c) && c!=':' && c!=MSDOS_EOF_CHAR) c= getc_mmap(dataptr); fieldlen= dataptr - fieldstart - 1; - while (EOF_mmap(dataptr, endptr) && c != '\n' && isspace(c)) c= getc_mmap(dataptr); + while (!EOF_mmap(dataptr, endptr) && c != '\n' && isspace(c)) c= getc_mmap(dataptr); if (EOF_mmap(dataptr, endptr)) parseerr(NULL,filename,lno, warnto,warncount,&newpig,0, _("EOF after field name `%.*s'"),fieldlen,fieldstart);