diff options
author | 2007-01-25 08:21:08 +0000 | |
---|---|---|
committer | 2007-01-25 08:21:08 +0000 | |
commit | 7347534fb0c396c8f79e068d35b9f8ac1909933a (patch) | |
tree | 8c0cf73af4465825372279728db1a5b84756379e /usr.bin/cvs/logmsg.c | |
parent | resolve conflicts with 9.3.4; SECURITY UPDATE (diff) | |
download | wireguard-openbsd-7347534fb0c396c8f79e068d35b9f8ac1909933a.tar.xz wireguard-openbsd-7347534fb0c396c8f79e068d35b9f8ac1909933a.zip |
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; } |