From c6a23874c69b81c2fa217d8d762ce095f5e4438c Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Sun, 22 Apr 2001 23:33:10 +0000 Subject: [PATCH] Fix another segfault when parsing single-paragraph files(ie, tmp.ci/control). --- ChangeLog | 5 +++++ lib/parse.c | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 47677909..2a3a1c0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Apr 22 18:32:02 CDT 2001 Adam Heath + + * 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 * main/filesdb.c: fix putat logic we broke earlier today diff --git a/lib/parse.c b/lib/parse.c index 98b231e8..646794dc 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; -- 2.39.5