changeset 914:b6b631c268f3

Be even more careful in the loop
author Sebastien Decugis <sdecugis@freediameter.net>
date Fri, 01 Feb 2013 17:05:26 +0100
parents 00994523f9d4
children 9bd18fa4e601
files libfdcore/sctp.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libfdcore/sctp.c	Tue Jan 29 14:30:16 2013 +0100
+++ b/libfdcore/sctp.c	Fri Feb 01 17:05:26 2013 +0100
@@ -1086,7 +1086,7 @@
 	
 	/* We will loop while all data is not received. */
 incomplete:
-	if (datasize + sizeof(struct timespec) >= bufsz ) {
+	while (datasize + sizeof(struct timespec) >= bufsz ) {
 		/* The buffer is full, enlarge it */
 		bufsz += mempagesz;
 		CHECK_MALLOC( data = realloc(data, bufsz ) );
"Welcome to our mercurial repository"