[dm-devel] [PATCH 16/42] libmultipath: error checking in remove_features()
Hannes Reinecke
hare at suse.de
Tue Jan 8 13:53:54 UTC 2013
An error check was missing in remove_features().
Signed-off-by: Hannes Reinecke <hare at suse.de>
---
libmultipath/structs.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libmultipath/structs.c b/libmultipath/structs.c
index 88e8706..049f17d 100644
--- a/libmultipath/structs.c
+++ b/libmultipath/structs.c
@@ -559,6 +559,9 @@ remove_feature(char **f, char *o)
* about to be removed
*/
p = strchr(*f, ' ');
+ if (!p)
+ /* Internal error, feature string inconsistent */
+ return 1;
while (*p == ' ')
p++;
p--;
--
1.7.4.2
More information about the dm-devel
mailing list