diff options
author | 2000-01-21 00:26:48 +0000 | |
---|---|---|
committer | 2000-01-21 00:26:48 +0000 | |
commit | 51aa82ef818119c4089da5deb634cd4ab22b014b (patch) | |
tree | 48e74618fc716aa3ef421ec99ef079c301802840 | |
parent | sync (diff) | |
download | wireguard-openbsd-51aa82ef818119c4089da5deb634cd4ab22b014b.tar.xz wireguard-openbsd-51aa82ef818119c4089da5deb634cd4ab22b014b.zip |
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); |