mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
dirmngr: Avoid crash due to an empty crls.d/DIR.txt.
* dirmngr/crlcache.c (check_dir_version): Avoid segv. -- GnuPG-bug-id: 1842 Debian-bug-id: 776611
This commit is contained in:
parent
abbefdd04d
commit
255dadd76d
@ -479,7 +479,9 @@ check_dir_version (estream_t *fpadr, const char *fname,
|
|||||||
if (lineerr)
|
if (lineerr)
|
||||||
return 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)
|
if (!created && cleanup_on_mismatch)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user