diff options
Diffstat (limited to '')
-rw-r--r-- | dirmngr/crlcache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dirmngr/crlcache.c b/dirmngr/crlcache.c index d10e3ca78..d4c3dcb2a 100644 --- a/dirmngr/crlcache.c +++ b/dirmngr/crlcache.c @@ -479,7 +479,9 @@ check_dir_version (estream_t *fpadr, const char *fname, if (lineerr) return lineerr; - if (strtol (line+2, NULL, 10) != DBDIRVERSION) + /* The !line catches the case of an empty DIR file. We handle this + the same as a non-matching version. */ + if (!line || strtol (line+2, NULL, 10) != DBDIRVERSION) { if (!created && cleanup_on_mismatch) { |