[erlang-questions] zlib design flaw?
Park, Sungjin
jinni.park@REDACTED
Wed Sep 24 04:55:18 CEST 2014
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.
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.
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?
--
Park, Sungjin
-------------------------------------------------------------------------------------------------------------------
Peculiar travel suggestions are dancing lessons from god.
-- The Books of Bokonon
-------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140924/a6b8d663/attachment.htm>
More information about the erlang-questions
mailing list