The code would be returning a static NULL buffer instead of
terminating the original buffer.

Signed-off-by: Hannes Reinecke <[email protected]>
---
 libmultipath/parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/parser.c b/libmultipath/parser.c
index dd955f3..c47d891 100644
--- a/libmultipath/parser.c
+++ b/libmultipath/parser.c
@@ -171,7 +171,7 @@ snprint_keyword(char *buff, int len, char *fmt, struct 
keyword *kw, void *data)
                        r = kw->print(conf, buff + fwd, len - fwd, data);
                        put_multipath_config(conf);
                        if (!r) { /* no output if no value */
-                               buff = '\0';
+                               buff[0] = '\0';
                                return 0;
                        }
                        fwd += r;
-- 
2.6.6

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to