# HG changeset patch # User Sebastien Decugis # Date 1359734726 -3600 # Node ID b6b631c268f38dc617a5c62212d93f4692944c86 # Parent 00994523f9d48978293060cdb33f73f8366660b6 Be even more careful in the loop diff -r 00994523f9d4 -r b6b631c268f3 libfdcore/sctp.c --- 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 ) );