Blame SOURCES/0211-RH-strlen-fix.patch

4728c8
---
4728c8
 multipathd/main.c |    9 ++++++---
4728c8
 1 file changed, 6 insertions(+), 3 deletions(-)
4728c8
4728c8
Index: multipath-tools-130222/multipathd/main.c
4728c8
===================================================================
4728c8
--- multipath-tools-130222.orig/multipathd/main.c
4728c8
+++ multipath-tools-130222/multipathd/main.c
4728c8
@@ -878,7 +878,8 @@ uxsock_trigger (char * str, char ** repl
4728c8
 	    (strncmp(str, "list", strlen("list")) != 0) &&
4728c8
 	    (strncmp(str, "show", strlen("show")) != 0)) {
4728c8
 		*reply = STRDUP("permission deny: need to be root");
4728c8
-		*len = strlen(*reply) + 1;
4728c8
+		if (*reply)
4728c8
+			*len = strlen(*reply) + 1;
4728c8
 		r = 1;
4728c8
 		goto out;
4728c8
 	}
4728c8
@@ -887,12 +888,14 @@ uxsock_trigger (char * str, char ** repl
4728c8
 
4728c8
 	if (r > 0) {
4728c8
 		*reply = STRDUP("fail\n");
4728c8
-		*len = strlen(*reply) + 1;
4728c8
+		if (*reply)
4728c8
+			*len = strlen(*reply) + 1;
4728c8
 		r = 1;
4728c8
 	}
4728c8
 	else if (!r && *len == 0) {
4728c8
 		*reply = STRDUP("ok\n");
4728c8
-		*len = strlen(*reply) + 1;
4728c8
+		if (*reply)
4728c8
+			*len = strlen(*reply) + 1;
4728c8
 		r = 0;
4728c8
 	}
4728c8
 	/* else if (r < 0) leave *reply alone */