From: Philippe Antoine Date: Mon, 28 Apr 2025 08:56:54 +0000 (+0200) Subject: detect: do not bug on tx data being NULL X-Git-Tag: suricata-7.0.11~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13110%2Fhead;p=thirdparty%2Fsuricata.git detect: do not bug on tx data being NULL Ticket: 7610 As this can happen for HTTP1 in Suricata 7 This was fixed in Suricata 8 by f301cd370205af7e069680c286252304ab128214 and 833a738dd1429f63c79d95edf25bb86fcc15b51a from ticket 5739 --- diff --git a/src/detect-engine-state.c b/src/detect-engine-state.c index 6fd7f96e58..2d7387b2c9 100644 --- a/src/detect-engine-state.c +++ b/src/detect-engine-state.c @@ -228,7 +228,6 @@ void DetectRunStoreStateTx( const uint16_t file_no_match) { AppLayerTxData *tx_data = AppLayerParserGetTxData(f->proto, f->alproto, tx); - BUG_ON(tx_data == NULL); if (tx_data == NULL) { SCLogDebug("No TX data for %" PRIu64, tx_id); return; @@ -284,7 +283,6 @@ void DetectEngineStateResetTxs(Flow *f) void *inspect_tx = AppLayerParserGetTx(f->proto, f->alproto, alstate, inspect_tx_id); if (inspect_tx != NULL) { AppLayerTxData *txd = AppLayerParserGetTxData(f->proto, f->alproto, inspect_tx); - BUG_ON(txd == NULL); if (txd) { ResetTxState(txd->de_state); } diff --git a/src/detect-filestore.c b/src/detect-filestore.c index c905f9b88d..d110efce7d 100644 --- a/src/detect-filestore.c +++ b/src/detect-filestore.c @@ -159,7 +159,6 @@ static int FilestorePostMatchWithOptions(Packet *p, Flow *f, const DetectFilesto DEBUG_VALIDATE_BUG_ON(txv == NULL); if (txv != NULL) { AppLayerTxData *txd = AppLayerParserGetTxData(f->proto, f->alproto, txv); - DEBUG_VALIDATE_BUG_ON(txd == NULL); if (txd != NULL) { if (toclient_dir) { txd->file_flags |= FLOWFILE_STORE_TC;