Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 237

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

diff --git a/modules/lookup_file.c b/modules/lookup_file.c
index 23ea07d..550bf5c 100644
--- a/modules/lookup_file.c
+++ b/modules/lookup_file.c
@@ -1047,7 +1047,7 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void *
 
 	debug(ap->logopt, MODPREFIX "looking up %s", name);
 
-	key_len = snprintf(key, KEY_MAX_LEN, "%s", name);
+	key_len = snprintf(key, KEY_MAX_LEN + 1, "%s", name);
 	if (key_len > KEY_MAX_LEN)
 		return NSS_STATUS_NOTFOUND;
 
diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
index 93a1b40..b8484a2 100644
--- a/modules/lookup_ldap.c
+++ b/modules/lookup_ldap.c
@@ -2053,7 +2053,7 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void *
 
 	debug(ap->logopt, MODPREFIX "looking up %s", name);
 
-	key_len = snprintf(key, KEY_MAX_LEN, "%s", name);
+	key_len = snprintf(key, KEY_MAX_LEN + 1, "%s", name);
 	if (key_len > KEY_MAX_LEN)
 		return NSS_STATUS_NOTFOUND;
 
diff --git a/modules/lookup_nisplus.c b/modules/lookup_nisplus.c
index bb1ca42..fee8b16 100644
--- a/modules/lookup_nisplus.c
+++ b/modules/lookup_nisplus.c
@@ -476,7 +476,7 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void *
 
 	debug(ap->logopt, MODPREFIX "looking up %s", name);
 
-	key_len = snprintf(key, KEY_MAX_LEN, "%s", name);
+	key_len = snprintf(key, KEY_MAX_LEN + 1, "%s", name);
 	if (key_len > KEY_MAX_LEN)
 		return NSS_STATUS_NOTFOUND;
 
diff --git a/modules/lookup_yp.c b/modules/lookup_yp.c
index e8ca8e8..5f4f95f 100644
--- a/modules/lookup_yp.c
+++ b/modules/lookup_yp.c
@@ -567,7 +567,7 @@ int lookup_mount(struct autofs_point *ap, const char *name, int name_len, void *
 
 	debug(ap->logopt, MODPREFIX "looking up %s", name);
 
-	key_len = snprintf(key, KEY_MAX_LEN, "%s", name);
+	key_len = snprintf(key, KEY_MAX_LEN + 1, "%s", name);
 	if (key_len > KEY_MAX_LEN)
 		return NSS_STATUS_NOTFOUND;