Blame SOURCES/autofs-5.1.2-fix-short-memory-allocation-in-lookup_amd_instance.patch

23b4c9
autofs-5.1.2 - fix short memory allocation in lookup_amd_instance()
23b4c9
23b4c9
From: Ian Kent <raven@themaw.net>
23b4c9
23b4c9
Fix off by one memory allocation size in lookup_amd_instance().
23b4c9
23b4c9
Signed-off-by: Ian Kent <raven@themaw.net>
23b4c9
---
23b4c9
 CHANGELOG       |    1 +
23b4c9
 daemon/lookup.c |    2 +-
23b4c9
 2 files changed, 2 insertions(+), 1 deletion(-)
23b4c9
23b4c9
--- autofs-5.0.7.orig/CHANGELOG
23b4c9
+++ autofs-5.0.7/CHANGELOG
23b4c9
@@ -218,6 +218,7 @@
23b4c9
 - check NFS server availability on local mount fallback.
23b4c9
 - honor last rw in mount options when doing a bind mount.
23b4c9
 - update and add README for old autofs schema.
23b4c9
+- fix short memory allocation in lookup_amd_instance().
23b4c9
 
23b4c9
 25/07/2012 autofs-5.0.7
23b4c9
 =======================
23b4c9
--- autofs-5.0.7.orig/daemon/lookup.c
23b4c9
+++ autofs-5.0.7/daemon/lookup.c
23b4c9
@@ -802,7 +802,7 @@ static int lookup_amd_instance(struct au
23b4c9
 		return NSS_STATUS_UNKNOWN;
23b4c9
 	}
23b4c9
 
23b4c9
-	m_key = malloc(strlen(ap->path) + strlen(me->multi->key) + 1);
23b4c9
+	m_key = malloc(strlen(ap->path) + strlen(me->multi->key) + 2);
23b4c9
 	if (!m_key) {
23b4c9
 		error(ap->logopt,
23b4c9
 		     "failed to allocate storage for search key");