diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-01-21 00:26:49 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-01-21 00:26:49 +0000 |
commit | 12a7ef5c52da2fca731d23d3b253f8a17f2c6a85 (patch) | |
tree | 73e72b86de9d3ed6ff6ccbcacb7a319ba7f21b49 | |
parent | e079cfb6b064fdb37ee8a3385be12c6461018cbf (diff) |
Deal with getcwd() returning NULL. This code is not currently
compiled but dixing it now means that it won't get flagged again
in a future audit. Noted by Oleg Safiullin <form@vell.nsc.ru>
-rw-r--r-- | usr.bin/sup/src/supfilesrv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/sup/src/supfilesrv.c b/usr.bin/sup/src/supfilesrv.c index b8bbe48653e..2590c1eaed4 100644 --- a/usr.bin/sup/src/supfilesrv.c +++ b/usr.bin/sup/src/supfilesrv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: supfilesrv.c,v 1.15 1998/06/03 16:20:38 deraadt Exp $ */ +/* $OpenBSD: supfilesrv.c,v 1.16 2000/01/21 00:26:48 millert Exp $ */ /* * Copyright (c) 1992 Carnegie Mellon University @@ -1108,8 +1108,8 @@ sendfiles () cdprefix (tl->TLprefix); #ifdef CVS if (candorcs) { - cvs_root = getcwd(NULL, 256); - if (access("CVSROOT", F_OK) < 0) + cvs_root = getcwd(NULL, MAXPATHLEN); + if (!cvs_root || access("CVSROOT", F_OK) < 0) dorcs = FALSE; else { loginfo("is a CVSROOT \"%s\"\n", cvs_root); |