1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00
freebsd-ports/sysutils/cpdup/files/patch-hclink.c
Wesley Shields 8f1a91c259 Fix off-by-one error.
PR:		ports/150618
Submitted by:	Oliver Fromme <olli@secnetix.de>
Approved by:	Gianmarco Giovannelli <gmarco@gufi.org> (maintainer)
Obtained from:	http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/704cef5251497a4f675f5554fa763c18fb622a5b
2010-09-25 22:04:19 +00:00

12 lines
436 B
C

--- ./hclink.c.orig 2010-09-25 18:01:27.989863475 -0400
+++ ./hclink.c 2010-09-25 18:01:46.138176079 -0400
@@ -388,7 +388,7 @@
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;