diff options
author | 2007-01-11 17:44:18 +0000 | |
---|---|---|
committer | 2007-01-11 17:44:18 +0000 | |
commit | 31cfd684fd6404f1c04b2057ad876e9060cd2263 (patch) | |
tree | f3a7336688cf99e24fd8dab3f7c67c81d7e0b758 /usr.bin/cvs/annotate.c | |
parent | update the revision number in CVS/Entries from CVS/Baserev if we (diff) | |
download | wireguard-openbsd-31cfd684fd6404f1c04b2057ad876e9060cd2263.tar.xz wireguard-openbsd-31cfd684fd6404f1c04b2057ad876e9060cd2263.zip |
rework opencvs so that we can deal with binary files. previously we assumed all files were ascii,
which broke things in real-world usage. now a checkout of src should work, albeit using lots of
memory and cpu. fixing this is the next step.
testing by many.
ok & some input joris@
Diffstat (limited to 'usr.bin/cvs/annotate.c')
-rw-r--r-- | usr.bin/cvs/annotate.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/cvs/annotate.c b/usr.bin/cvs/annotate.c index 5e26f7a425f..50a2440fca4 100644 --- a/usr.bin/cvs/annotate.c +++ b/usr.bin/cvs/annotate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: annotate.c,v 1.33 2007/01/11 02:35:55 joris Exp $ */ +/* $OpenBSD: annotate.c,v 1.34 2007/01/11 17:44:18 niallo Exp $ */ /* * Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org> * @@ -112,6 +112,7 @@ cvs_annotate_local(struct cvs_file *cf) BUF *b; RCSNUM *ann_rev; char *content; + size_t len; ann_rev = NULL; @@ -136,8 +137,9 @@ cvs_annotate_local(struct cvs_file *cf) b = rcs_getrev(cf->file_rcs, ann_rev); cvs_buf_putc(b, '\0'); + len = cvs_buf_len(b); content = cvs_buf_release(b); - if ((lines = cvs_splitlines(content)) == NULL) + if ((lines = cvs_splitlines(content, len)) == NULL) fatal("cvs_annotate_local: cvs_splitlines failed"); xfree(content); |