Index: b/src/crlcache.c =================================================================== --- b/src/crlcache.c +++ b/src/crlcache.c @@ -460,12 +460,14 @@ { char *line; gpg_error_t lineerr = 0; + int gotline = 0; FILE *fp = *fpadr; int created = 0; retry: while ((line = next_line_from_file (fp, &lineerr))) { + gotline = 1; ++*lineno; if (*line == 'v' && line[1] == ':') break; @@ -477,6 +479,11 @@ } xfree (line); } + if (!gotline) + { + log_error (_("no lines in `%s'\n"), fname); + return gpg_error (GPG_ERR_CONFIGURATION); + } if (lineerr) return lineerr;