diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2004-09-27 13:29:28 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2004-09-27 13:29:28 +0000 |
commit | a7ea9f138d18bd470b12f1e9e0f0de174f9b465c (patch) | |
tree | 190bc7b3e7475982a6460e3bb68e813cee7b7002 /usr.bin/cvs | |
parent | 921baeb3f36727bcd780d271cb864139db448975 (diff) |
use the real lenght to zero out the buffer in
cvs_buf_alloc();
ok jfb@
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/buf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/buf.c b/usr.bin/cvs/buf.c index d0c60d69202..33b503d2014 100644 --- a/usr.bin/cvs/buf.c +++ b/usr.bin/cvs/buf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.c,v 1.2 2004/07/13 22:21:11 jfb Exp $ */ +/* $OpenBSD: buf.c,v 1.3 2004/09/27 13:29:27 joris Exp $ */ /* * Copyright (c) 2003 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -88,7 +88,7 @@ cvs_buf_alloc(size_t len, u_int flags) free(b); return (NULL); } - memset(b->cb_buf, 0, sizeof(b->cb_buf)); + memset(b->cb_buf, 0, len); b->cb_flags = flags; b->cb_size = len; |