From 6637873348982190b677553848b444b12bb9589c Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 18 Mar 2010 15:02:50 +0100 Subject: [PATCH] Update prev ptrs in SigMatchReplaceContent --- src/detect-parse.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/detect-parse.c b/src/detect-parse.c index ca72d29fda..9b151f29d8 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -158,8 +158,14 @@ void SigMatchReplaceContent(Signature *s, SigMatch *old, SigMatch *new) { if (m == old) { if (m == s->pmatch) { s->pmatch = m->next; + if (m->next != NULL) { + m->next->prev = NULL; + } } else { pm->next = m->next; + if (m->next != NULL) { + m->next->prev = pm; + } } if (m == s->pmatch_tail) { @@ -172,6 +178,7 @@ void SigMatchReplaceContent(Signature *s, SigMatch *old, SigMatch *new) { pm = m; } + /* finally append the "new" sig match to the app layer list */ SigMatchAppendAppLayer(s, new); }