libmpathpersist: Fix possible overrun in devt2devname()
authorHannes Reinecke <hare@suse.de>
Wed, 15 Jun 2016 08:52:53 +0000 (10:52 +0200)
committerHannes Reinecke <hare@suse.de>
Thu, 16 Jun 2016 08:51:32 +0000 (10:51 +0200)
pp->dev is of size FILE_NAME_SIZE, not PATH_SIZE.
Found by coverity.

Signed-off-by: Hannes Reinecke <hare@suse.com>
libmpathpersist/mpath_persist.c

index d2c3e53..c4b8521 100644 (file)
@@ -84,7 +84,7 @@ updatepaths (struct multipath * mpp)
 
                vector_foreach_slot (pgp->paths, pp, j){
                        if (!strlen(pp->dev)){
-                               if (devt2devname(pp->dev, PATH_SIZE,
+                               if (devt2devname(pp->dev, FILE_NAME_SIZE,
                                                 pp->dev_t)){
                                        /*
                                         * path is not in sysfs anymore