pp->dev is of size FILE_NAME_SIZE, not PATH_SIZE.
Found by coverity.

Signed-off-by: Hannes Reinecke <[email protected]>
---
 libmpathpersist/mpath_persist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
index d2c3e53..c4b8521 100644
--- a/libmpathpersist/mpath_persist.c
+++ b/libmpathpersist/mpath_persist.c
@@ -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
-- 
2.6.6

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to