diff options
author | Adam Heath <doogie@debian.org> | 2001-04-22 23:33:10 +0000 |
---|---|---|
committer | Adam Heath <doogie@debian.org> | 2001-04-22 23:33:10 +0000 |
commit | c6a23874c69b81c2fa217d8d762ce095f5e4438c (patch) | |
tree | 7752d3451b484996e244349229a731c4e99c7374 | |
parent | c38e2efc2fc336a3a2f6b93b5638f3a7aed4068b (diff) | |
download | dpkg-c6a23874c69b81c2fa217d8d762ce095f5e4438c.tar.gz |
Fix another segfault when parsing single-paragraph files(ie,
tmp.ci/control).
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/parse.c | 1 |
2 files changed, 6 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Sun Apr 22 18:32:02 CDT 2001 Adam Heath <doogie@debian.org> + + * lib/parse.c: Fix another segfault when parsing single-paragraph + files(ie, tmp.ci/control). + Sun Apr 22 17:13:17 CEST 2001 Wichert Akkerman <wakkerma@debian.org> * main/filesdb.c: fix putat logic we broke earlier today diff --git a/lib/parse.c b/lib/parse.c index 98b231e83..646794dc8 100644 --- a/lib/parse.c +++ b/lib/parse.c @@ -171,6 +171,7 @@ int parsedb(const char *filename, enum parsedbflags flags, for (;;) { if (c == '\n' || c == MSDOS_EOF_CHAR) { lno++; + if (EOF_mmap(dataptr, endptr)) break; c= getc_mmap(dataptr); /* Found double eol, or start of new field */ if (EOF_mmap(dataptr, endptr) || c == '\n' || !isspace(c)) break; |