From: Peter Avalos Date: Fri, 10 Sep 2010 02:33:19 +0000 (-1000) Subject: cpdup: Fix off-by-one error. X-Git-Url: https://gitweb.dragonflybsd.org/~lentferj/dragonfly.git/commitdiff_plain/704cef5251497a4f675f5554fa763c18fb622a5b cpdup: Fix off-by-one error. Submitted-by: dillon@ --- diff --git a/bin/cpdup/hclink.c b/bin/cpdup/hclink.c index 126b37a131..c0edf1cace 100644 --- a/bin/cpdup/hclink.c +++ b/bin/cpdup/hclink.c @@ -388,7 +388,7 @@ int hcc_check_space(hctransaction_t trans, struct HCHead *head, int n, int size) { size = HCC_ALIGN(size) + n * sizeof(struct HCLeaf); - if (size > HC_BUFSIZE - trans->windex) { + if (size >= HC_BUFSIZE - trans->windex) { struct HCHead *whead = (void *)trans->wbuf; whead->cmd |= HCF_CONTINUE;