#864 xmppstream thinks it leaks memory when sending escaped (e.g. > ) content and disconnects client after some time
What steps will reproduce the problem?
1. Send stanzas containing escaped xml characters, like > < etc.
2. In utils xmppstream.lua, function feed, the whole size is added to local variable n_outstanding_bytes
3. During parsing, luaexpat library unescapes them to a single character and in the callback handler ( function handle_progress ), only the unescaped size ( 1 byte vs. 4 bytes) is subtracted from n_outstanding_bytes, resulting in a "leak" of 3 bytes. This happens for each escaped character and adds up until the stanza size limit is reached. Then the client gets disconnected.
What is the expected output? What do you see instead?
The client does not get disconnected regularly because of a assumed leak.
What version of the product are you using? On what operating system?
Version 0.9.10, but apparently, the code in current master is still the same.
Please provide any additional information below.
Hi, thanks for the report.
I've tried to reproduce this, but have had no luck.
Can you please include your versions of LuaExpat and Expat as well?