Function select_default_entry() can call make_default_entry() so a NULL return is possible. Signed-off-by: Ian Kent <raven@xxxxxxxxxx> --- CHANGELOG | 1 + modules/parse_amd.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 0365a161..5a317f12 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -39,6 +39,7 @@ xx/xx/2018 autofs-5.1.5 - fix use after free in parse_ldap_config(). - fix incorrect locking in sss lookup. - fix amd parser opts option handling. +- fix possible NULL pointer dereference in get_defaults_entry(). 19/12/2017 autofs-5.1.4 - fix spec file url. diff --git a/modules/parse_amd.c b/modules/parse_amd.c index 627c3c00..7399d19e 100644 --- a/modules/parse_amd.c +++ b/modules/parse_amd.c @@ -1998,7 +1998,7 @@ static struct amd_entry *get_defaults_entry(struct autofs_point *ap, goto out; } entry = select_default_entry(ap, &dflts, sv); - if (!entry->map_type) { + if (entry && !entry->map_type) { /* * If map type isn't given try to inherit from * parent. A NULL map type is valid and means