Blame SOURCES/autofs-5.0.7-add-null-check-in-extract_version.patch

306fa1
autofs-5.0.7 - add null check in extract_version()
306fa1
306fa1
From: Ian Kent <raven@themaw.net>
306fa1
306fa1
A space should always be found in the passed in string but a check
306fa1
should be done in case it isn't.
306fa1
---
306fa1
 lib/mounts.c |    2 ++
306fa1
 1 file changed, 2 insertions(+)
306fa1
306fa1
diff --git a/lib/mounts.c b/lib/mounts.c
306fa1
index 0caa0aa..7b959b8 100644
306fa1
--- a/lib/mounts.c
306fa1
+++ b/lib/mounts.c
306fa1
@@ -168,6 +168,8 @@ unsigned int get_kver_minor(void)
306fa1
 static int extract_version(char *start, struct nfs_mount_vers *vers)
306fa1
 {
306fa1
 	char *s_ver = strchr(start, ' ');
306fa1
+	if (!s_ver)
306fa1
+		return 0;
306fa1
 	while (*s_ver && !isdigit(*s_ver)) {
306fa1
 		s_ver++;
306fa1
 		if (!*s_ver)