]> git.ipfire.org Git - thirdparty/suricata.git/commit
http: fix body tracking corner case 2629/head
authorVictor Julien <victor@inliniac.net>
Wed, 29 Mar 2017 09:15:51 +0000 (11:15 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 29 Mar 2017 16:06:25 +0000 (18:06 +0200)
commit3726fd66bee905fcca279d18ffabe2a06659eac7
treec53c3565e1b8d7509de794fd242b9c4a5d4a54a1
parent3ca1a29bbd6cfe05f20a9d9717be7b98214a3591
http: fix body tracking corner case

In some cases, observed with inspect limits 0, the body tracking could
get confused. When all chunks were already freed, a new chunk would
be considered to be the start of the body. This would overwrite the
bodies 'content_len_so_far' tracker, instead of adding to it. This in
turn could lead to a assertion abort in the inspection code.

This patch redoes the append code to always add the current lenght. It
cleans up the code to remove redundant logic.

Issue: https://redmine.openinfosecfoundation.org/issues/2078
Reported-By: Jørgen Bøhnsdalen
src/app-layer-htp-body.c