[dm-devel] [PATCH 19/39] libmpathpersist: Fix possible overrun in devt2devname()

Hannes Reinecke hare at suse.de
Thu Jun 16 09:47:25 UTC 2016


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

Signed-off-by: Hannes Reinecke <hare at suse.com>
---
 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




More information about the dm-devel mailing list