cpdup: Fix off-by-one error.
authorPeter Avalos <pavalos@theshell.com>
Fri, 10 Sep 2010 02:33:19 +0000 (16:33 -1000)
committerPeter Avalos <pavalos@theshell.com>
Fri, 10 Sep 2010 02:33:19 +0000 (16:33 -1000)
Submitted-by: dillon@

bin/cpdup/hclink.c

index 126b37a..c0edf1c 100644 (file)
@@ -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;