diff options
author | 2014-11-22 15:51:40 +0000 | |
---|---|---|
committer | 2014-11-22 15:51:40 +0000 | |
commit | 9a60c4037cba615115ac7b30fa63bc04839d8c1f (patch) | |
tree | 514f833f5fbf9b3a3f51b956515c86bbe9656816 /usr.bin/rcs | |
parent | Remove SCCS support. For this to work, we would need "get", which we don't (diff) | |
download | wireguard-openbsd-9a60c4037cba615115ac7b30fa63bc04839d8c1f.tar.xz wireguard-openbsd-9a60c4037cba615115ac7b30fa63bc04839d8c1f.zip |
Fixed uninitialized pointer (and other struct entries while at it)
which is referenced while parsing invalid RCS files.
Spotted by jsg.
ok deraadt
Diffstat (limited to 'usr.bin/rcs')
-rw-r--r-- | usr.bin/rcs/rcsparse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/rcs/rcsparse.c b/usr.bin/rcs/rcsparse.c index 0a361847b1d..f0189a436c7 100644 --- a/usr.bin/rcs/rcsparse.c +++ b/usr.bin/rcs/rcsparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsparse.c,v 1.11 2014/11/16 19:14:34 bluhm Exp $ */ +/* $OpenBSD: rcsparse.c,v 1.12 2014/11/22 15:51:40 tobias Exp $ */ /* * Copyright (c) 2010 Tobias Stoeckmann <tobias@openbsd.org> * @@ -223,7 +223,7 @@ rcsparse_init(RCSFILE *rfp) if (rfp->rf_flags & RCS_PARSED) return (0); - pdp = xmalloc(sizeof(*pdp)); + pdp = xcalloc(sizeof(*pdp)); pdp->rp_buf = xmalloc(RCS_BUFSIZE); pdp->rp_blen = RCS_BUFSIZE; pdp->rp_bufend = pdp->rp_buf + pdp->rp_blen - 1; |