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

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