The theoretical maximum of those packets could very well be around 100 megabytes, even tho it's unlikely you'll actually see this. I'd advise against allocating static buffer for

. Grow the buffer if necessary or try to read/write across multiple gathered packets instead.