diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2006-03-28 02:13:45 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2006-03-28 02:13:45 +0000 |
commit | dfbe3f4f54568b5eedfe5695987a22e774114f2a (patch) | |
tree | ff9dd12a8cf0838ea8838e117f422cf9e7bbd587 /usr.bin/cvs/rcs.c | |
parent | 44e7e454767c74777de3725352a5d79f6529fe60 (diff) |
Today is Integer Overflow Prevention Day:
- Sync xmalloc.? with ssh versions.
- Change all xrealloc() calls to new API.
``I really like this.'' niallo@
Diffstat (limited to 'usr.bin/cvs/rcs.c')
-rw-r--r-- | usr.bin/cvs/rcs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 5e0a65551f7..179535860c6 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.152 2006/03/27 21:56:32 niallo Exp $ */ +/* $OpenBSD: rcs.c,v 1.153 2006/03/28 02:13:44 ray Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -2432,7 +2432,7 @@ rcs_growbuf(RCSFILE *rf) void *tmp; struct rcs_pdata *pdp = (struct rcs_pdata *)rf->rf_pdata; - tmp = xrealloc(pdp->rp_buf, pdp->rp_blen + RCS_BUFEXTSIZE); + tmp = xrealloc(pdp->rp_buf, 1, pdp->rp_blen + RCS_BUFEXTSIZE); pdp->rp_buf = (char *)tmp; pdp->rp_blen += RCS_BUFEXTSIZE; pdp->rp_bufend = pdp->rp_buf + pdp->rp_blen - 1; @@ -2641,7 +2641,7 @@ rcs_expand_keywords(char *rcsfile, struct rcs_delta *rdp, char *data, /* only realloc if we have to */ if (sizdiff > 0) { len += sizdiff; - data = xrealloc(data, len); + data = xrealloc(data, 1, len); /* * ensure string pointers are not invalidated * after realloc() |