]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: lua: fix a segfault in txn:done() if called twice
authorWilly Tarreau <w@1wt.eu>
Fri, 28 Aug 2015 08:06:15 +0000 (10:06 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 28 Aug 2015 08:28:24 +0000 (10:28 +0200)
commit630ef4585af1544b20bf5708f9fa8f5453e6ad25
tree0e8fd3aa2cc87bff411c0501dda92d70e8ab76b9
parenta678b43119eb51c60330375c18741518bdef6d14
BUG/MEDIUM: lua: fix a segfault in txn:done() if called twice

When called from an http ruleset, txn:done() can still crash the process
because it closes the stream without consuming pending data resulting in
the transaction's buffer representation to differ from the real buffer.

This patch also adjusts the transaction's state to indicate that it's
closed to be consistent with what's already done in redirect rules.
src/hlua.c