> Calculate required buffer size, compare to actual buffer size.

 

Ah yes, sorry got confused there for a moment. I sent an updated patch to do the calculation properly.

 

Regards,
Fabian Maurer