From 60ae67a42bc62b95575cea65e6bf52fbac578fd8 Mon Sep 17 00:00:00 2001 From: adrian Date: Sat, 11 Jan 2014 15:01:30 +0000 Subject: Close the newly-created FD if the pathname is too long. Coverity: CID 1007204 Sponsored by: Netflix, Inc. --- bin/cat/cat.c | 1 + 1 file changed, 1 insertion(+) (limited to 'bin') diff --git a/bin/cat/cat.c b/bin/cat/cat.c index 0daac7c..f724cb0 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -316,6 +316,7 @@ udom_open(const char *path, int flags) sou.sun_family = AF_UNIX; if ((len = strlcpy(sou.sun_path, path, sizeof(sou.sun_path))) >= sizeof(sou.sun_path)) { + close(fd); errno = ENAMETOOLONG; return (-1); } -- cgit v1.1