Blame SOURCES/autofs-5.1.2-fix-invalid-reference-in-remount_active_mount.patch

4d476f
autofs-5.1.2 - fix invalid reference in remount_active_mount()
4d476f
4d476f
From: Ian Kent <raven@themaw.net>
4d476f
4d476f
remount_active_mount() can be called with the map entry pointer NULL
4d476f
so it must be checked before use when getting the automount timeout.
4d476f
4d476f
Signed-off-by: Ian Kent <raven@themaw.net>
4d476f
---
4d476f
 CHANGELOG    |    1 +
4d476f
 lib/mounts.c |    6 ++++--
4d476f
 2 files changed, 5 insertions(+), 2 deletions(-)
4d476f
4d476f
--- autofs-5.0.7.orig/lib/mounts.c
4d476f
+++ autofs-5.0.7/lib/mounts.c
4d476f
@@ -1721,8 +1721,10 @@ static int remount_active_mount(struct a
4d476f
 	if (fd == -1)
4d476f
 		return REMOUNT_OPEN_FAIL;
4d476f
 
4d476f
-	error(ap->logopt, "ap->type %d type %u", ap->type, type);
4d476f
-	timeout = get_exp_timeout(ap, me->source);
4d476f
+	if (!me)
4d476f
+		timeout = get_exp_timeout(ap, NULL);
4d476f
+	else
4d476f
+		timeout = get_exp_timeout(ap, me->source);
4d476f
 
4d476f
 	/* Re-reading the map, set timeout and return */
4d476f
 	if (ap->state == ST_READMAP) {
4d476f
--- autofs-5.0.7.orig/CHANGELOG
4d476f
+++ autofs-5.0.7/CHANGELOG
4d476f
@@ -246,6 +246,7 @@
4d476f
 - fix possible NULL derefernce.
4d476f
 - fix work around sss startup delay.
4d476f
 - improve scalability of direct mount path component.
4d476f
+- fix invalid reference in remount_active_mount().
4d476f
 
4d476f
 25/07/2012 autofs-5.0.7
4d476f
 =======================