From: Philippe Antoine Date: Tue, 8 Oct 2024 11:51:32 +0000 (+0200) Subject: http: fix condition check X-Git-Tag: suricata-8.0.0-beta1~818 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76527dde79a5825299c9534e8da1fabb7fb4279e;p=thirdparty%2Fsuricata.git http: fix condition check Ticket: 7309 Do not use a constant expression in a condition --- diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index 3f3037ca30..f3101fde70 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -1168,7 +1168,7 @@ static void FlagDetectStateNewFile(HtpTxUserData *tx, int dir) if (dir == STREAM_TOSERVER) { SCLogDebug("DETECT_ENGINE_STATE_FLAG_FILE_NEW set"); tx->tx_data.de_state->dir_state[0].flags |= DETECT_ENGINE_STATE_FLAG_FILE_NEW; - } else if (STREAM_TOCLIENT) { + } else if (dir == STREAM_TOCLIENT) { SCLogDebug("DETECT_ENGINE_STATE_FLAG_FILE_NEW set"); tx->tx_data.de_state->dir_state[1].flags |= DETECT_ENGINE_STATE_FLAG_FILE_NEW; }