linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mkfs: check config realpath for errors
@ 2018-06-15 22:39 Eric Sandeen
  2018-06-19 20:04 ` Luis R. Rodriguez
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2018-06-15 22:39 UTC (permalink / raw)
  To: linux-xfs

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/mkfs/config.c b/mkfs/config.c
index 3a389ad..9954691 100644
--- a/mkfs/config.c
+++ b/mkfs/config.c
@@ -573,7 +573,8 @@ open_config_file(
 			goto out;
 		}
 		/* Get absolute path to this file */
-		realpath(config_file, *fpath);
+		if (!realpath(config_file, *fpath))
+			goto out;
 		fd = openat(AT_FDCWD, config_file, O_NOFOLLOW, O_RDONLY);
 	}
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-19 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-15 22:39 [PATCH] mkfs: check config realpath for errors Eric Sandeen
2018-06-19 20:04 ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).