# HG changeset patch # User Kim Alvefur # Date 1596320577 -7200 # Node ID a59b37b03eca8f5dbd86085d30fbf7c745198d75 # Parent 3e5bc34be7349e82b65318293ebc048c45781eb8 mod_net_multiplex: Read no more than the max buffer size setting Otherwise the '*a' read mode applies, which under certain circumstances can read infinite amounts of data into memory. diff -r 3e5bc34be734 -r a59b37b03eca plugins/mod_net_multiplex.lua --- a/plugins/mod_net_multiplex.lua Sat Aug 01 18:41:30 2020 +0200 +++ b/plugins/mod_net_multiplex.lua Sun Aug 02 00:22:57 2020 +0200 @@ -41,7 +41,7 @@ local buffers = {}; -local listener = { default_mode = "*a" }; +local listener = { default_mode = max_buffer_len }; function listener.onconnect(conn) local sock = conn:socket();