summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Heath <doogie@debian.org>2001-04-22 23:33:10 +0000
committerAdam Heath <doogie@debian.org>2001-04-22 23:33:10 +0000
commitc6a23874c69b81c2fa217d8d762ce095f5e4438c (patch)
tree7752d3451b484996e244349229a731c4e99c7374
parentc38e2efc2fc336a3a2f6b93b5638f3a7aed4068b (diff)
downloaddpkg-c6a23874c69b81c2fa217d8d762ce095f5e4438c.tar.gz
Fix another segfault when parsing single-paragraph files(ie,
tmp.ci/control).
-rw-r--r--ChangeLog5
-rw-r--r--lib/parse.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 476779092..2a3a1c0f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;