In modules/mount_autofs.c:mount_mount() a NULL pointer dereference is (unlikley but) possible. Signed-off-by: Ian Kent <raven@xxxxxxxxxx> --- CHANGELOG | 1 + modules/mount_autofs.c | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1a4a8d9..2dceb69 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -55,6 +55,7 @@ xx/xx/2016 autofs-5.1.3 - factor out set_thread_mount_request_log_id(). - add config option to use mount request log id. - use autofs_point to store expire timeout where possibe. +- fix possible NULL derefernce. 15/06/2016 autofs-5.1.2 ======================= diff --git a/modules/mount_autofs.c b/modules/mount_autofs.c index be9d51d..076ab85 100644 --- a/modules/mount_autofs.c +++ b/modules/mount_autofs.c @@ -281,13 +281,16 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, if (source->flags & MAP_FLAG_FORMAT_AMD) { struct amd_entry *am_entry = __master_find_amdmount(ap, entry->path); - if (am_entry && am_entry->pref) { - nap->pref = am_entry->pref; - am_entry->pref = NULL; - } - if (am_entry->cache_opts & AMD_CACHE_OPTION_ALL) - nap->flags |= MOUNT_FLAG_AMD_CACHE_ALL; + if (am_entry) { + if (am_entry->pref) { + nap->pref = am_entry->pref; + am_entry->pref = NULL; + } + + if (am_entry->cache_opts & AMD_CACHE_OPTION_ALL) + nap->flags |= MOUNT_FLAG_AMD_CACHE_ALL; + } } if (handle_mounts_startup_cond_init(&suc)) { -- To unsubscribe from this list: send the line "unsubscribe autofs" in