[dm-devel] tiny bug
Benjamin Marzinski
bmarzins at redhat.com
Mon Jul 18 21:53:05 UTC 2005
mulitpathd was crashing when I entered an empty line at the CLI prompt, because
the output buffer from get_word was being checked to see if it was NULL, but
get_word never explicitly sets the buffer to NULL if there is no word.
The patch fixes this.
-Ben
-------------- next part --------------
diff -urpN mp-devel/libmultipath/util.c mp-devel-patched/libmultipath/util.c
--- mp-devel/libmultipath/util.c 2005-06-20 18:00:23.000000000 -0500
+++ mp-devel-patched/libmultipath/util.c 2005-07-18 14:28:18.332453696 -0500
@@ -59,6 +59,8 @@ get_word (char * sentence, char ** word)
int len;
int skip = 0;
+ if (word)
+ *word = NULL;
while (*sentence == ' ') {
sentence++;
skip++;
More information about the dm-devel
mailing list