libmultipath: error checking in remove_features()
authorHannes Reinecke <hare@suse.de>
Tue, 8 Jan 2013 13:53:54 +0000 (14:53 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 8 Jan 2013 22:38:23 +0000 (23:38 +0100)
An error check was missing in remove_features().

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/structs.c

index 88e8706..049f17d 100644 (file)
@@ -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--;