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