=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/rcs.c,v retrieving revision 1.137 retrieving revision 1.138 diff -c -r1.137 -r1.138 *** src/usr.bin/cvs/rcs.c 2006/03/07 19:17:57 1.137 --- src/usr.bin/cvs/rcs.c 2006/03/08 05:01:50 1.138 *************** *** 1,4 **** ! /* $OpenBSD: rcs.c,v 1.137 2006/03/07 19:17:57 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: rcs.c,v 1.138 2006/03/08 05:01:50 deraadt Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 1111,1117 **** dlp = TAILQ_PREV(dlp, cvs_tqh, l_list); } else if (dlp->l_lineno < lineno) { if (((ndlp = TAILQ_NEXT(dlp, l_list)) == NULL) || ! (ndlp->l_lineno > lineno)) break; dlp = ndlp; } --- 1111,1117 ---- dlp = TAILQ_PREV(dlp, cvs_tqh, l_list); } else if (dlp->l_lineno < lineno) { if (((ndlp = TAILQ_NEXT(dlp, l_list)) == NULL) || ! (ndlp->l_lineno > lineno)) break; dlp = ndlp; } *************** *** 2731,2737 **** /* end the expansion */ if (mode & RCS_KWEXP_NAME) strlcat(expbuf, "$", sizeof(expbuf)); ! sizdiff = strlen(expbuf) - (end - start); tbuf = xmalloc(strlen(end) + 1); strlcpy(tbuf, end, strlen(end) + 1); --- 2731,2737 ---- /* end the expansion */ if (mode & RCS_KWEXP_NAME) strlcat(expbuf, "$", sizeof(expbuf)); ! sizdiff = strlen(expbuf) - (end - start); tbuf = xmalloc(strlen(end) + 1); strlcpy(tbuf, end, strlen(end) + 1); *************** *** 2921,2927 **** expanded = rcs_expand_keywords(rf->rf_path, rdp, tbuf, len, expmode); bp = cvs_buf_alloc(len, BUF_AUTOEXT); ! cvs_buf_set(bp, expanded, strlen(expanded), 0); xfree(expanded); } return (bp); --- 2921,2927 ---- expanded = rcs_expand_keywords(rf->rf_path, rdp, tbuf, len, expmode); bp = cvs_buf_alloc(len, BUF_AUTOEXT); ! cvs_buf_set(bp, expanded, strlen(expanded), 0); xfree(expanded); } return (bp);