- (bal) strcat -> strlcat on openbsd-compat/realpath.c (rev 1.8 OpenBSD)

This commit is contained in:
Ben Lindstrom 2003-05-18 01:22:43 +00:00
parent e27c6cc3ad
commit 4c9e9ab165
2 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,6 @@
20030517
- (bal) strcat -> strlcat on openbsd-compat/realpath.c (rev 1.8 OpenBSD)
20030516
- (djm) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2003/05/15 13:52:10
@ -1549,4 +1552,4 @@
save auth method before monitor_reset_key_state(); bugzilla bug #284;
ok provos@
$Id: ChangeLog,v 1.2730 2003/05/16 08:21:01 djm Exp $
$Id: ChangeLog,v 1.2731 2003/05/18 01:22:43 mouring Exp $

View File

@ -32,7 +32,7 @@
#if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH)
#if defined(LIBC_SCCS) && !defined(lint)
static char *rcsid = "$OpenBSD: realpath.c,v 1.7 2002/05/24 21:22:37 deraadt Exp $";
static char *rcsid = "$OpenBSD: realpath.c,v 1.8 2003/04/04 22:47:43 hin Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -148,8 +148,8 @@ loop:
goto err1;
}
if (rootd == 0)
(void)strcat(resolved, "/");
(void)strcat(resolved, wbuf);
strlcat(resolved, "/", MAXPATHLEN);
strlcat(resolved, wbuf, MAXPATHLEN);
}
/* Go back to where we came from. */