[PATCH 16/42] libmultipath: error checking in remove_features()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



An error check was missing in remove_features().

Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
 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

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel


[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux