[dm-devel] [PATCH 2/3] libmultipath/parser.c: correctly terminate buffer
Hannes Reinecke
hare at suse.de
Tue Aug 9 07:31:12 UTC 2016
The code would be returning a static NULL buffer instead of
terminating the original buffer.
Signed-off-by: Hannes Reinecke <hare at suse.com>
---
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
More information about the dm-devel
mailing list