changeset 913:00994523f9d4

Fix regression introduced in changeset 894 (Thanks Hannes for pointing this)
author Sebastien Decugis <sdecugis@freediameter.net>
date Tue, 29 Jan 2013 14:30:16 +0100
parents 0a46772fad5d
children b6b631c268f3
files libfdcore/sctp.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libfdcore/sctp.c	Tue Jan 29 13:40:29 2013 +0100
+++ b/libfdcore/sctp.c	Tue Jan 29 14:30:16 2013 +0100
@@ -1086,7 +1086,7 @@
 	
 	/* We will loop while all data is not received. */
 incomplete:
-	if (datasize == bufsz - sizeof(struct timespec)) {
+	if (datasize + sizeof(struct timespec) >= bufsz ) {
 		/* The buffer is full, enlarge it */
 		bufsz += mempagesz;
 		CHECK_MALLOC( data = realloc(data, bufsz ) );
"Welcome to our mercurial repository"