<div dir="ltr">Hi, I'm about to report a problem with erlang's zlib library interface which I think is a design flaw at this point of time.<div><br></div><div>We recently had some malicious packets which were not very big in the first place but inflated to really big ones - hundreds of megabytes each. As a result, the server crashed with out-of-memory by the processes calling zlib:inflate/2. Urgency forced us to make a custom NIF library with inflation size limit. We also studied erlang reference manual but couldn't find anything useful. The zlib library source code shows even zlib:setBufSize/2 does not prevent producing very big binaries.</div><div><br></div><div>Not being able to know how big the data would become after inflation, it should be a quite common problem. So I'm curious if I missed something very simple and nice. Is there anything like that?</div><div><div><br></div>-- <br>Park, Sungjin<div>-------------------------------------------------------------------------------------------------------------------</div><div>Peculiar travel suggestions are dancing lessons from god.</div><div> -- The Books of Bokonon</div><div>-------------------------------------------------------------------------------------------------------------------</div>
</div></div>