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

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