diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-01-25 08:21:09 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-01-25 08:21:09 +0000 |
commit | 9225bc0b972e0c537a65e3d75b6e4911d5e3ac49 (patch) | |
tree | b1790c175310d82ceb2ba21830f77faccbd0b051 /usr.bin/cvs/logmsg.c | |
parent | 5ba26d4f49e12570f62d5ae78018a32ed16e6b44 (diff) |
do not use strlcpuy on a buffer filled by fgetln, since fgetln does
not NUL-terminate. ok xsa@
Diffstat (limited to 'usr.bin/cvs/logmsg.c')
-rw-r--r-- | usr.bin/cvs/logmsg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/cvs/logmsg.c b/usr.bin/cvs/logmsg.c index 2bae1b6e69a..bc840647c1f 100644 --- a/usr.bin/cvs/logmsg.c +++ b/usr.bin/cvs/logmsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: logmsg.c,v 1.35 2007/01/11 08:48:59 xsa Exp $ */ +/* $OpenBSD: logmsg.c,v 1.36 2007/01/25 08:21:08 otto Exp $ */ /* * Copyright (c) 2007 Joris Vink <joris@openbsd.org> * @@ -55,7 +55,8 @@ cvs_logmsg_read(const char *path) buf[len - 1] = '\0'; } else { lbuf = xmalloc(len + 1); - strlcpy(lbuf, buf, len); + memcpy(lbuf, buf, len); + lbuf[len] = '\0'; buf = lbuf; } |