From a866d5d915bf472df535ed592218178ef5db0bc2 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 17 Dec 2015 10:34:17 +0100 Subject: [PATCH] tx logging: fix potential missed logging issue Wrong scope of proto_logged variable could potentially lead to incrementing logged tx id w/o actually being logged. Reported-By: Jason Ish --- src/output-tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/output-tx.c b/src/output-tx.c index e05c540a07..ca9216478b 100644 --- a/src/output-tx.c +++ b/src/output-tx.c @@ -125,10 +125,10 @@ static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data, PacketQ int tx_progress_done_value_tc = AppLayerParserGetStateProgressCompletionStatus(p->proto, alproto, STREAM_TOCLIENT); - int proto_logged = 0; - for (; tx_id < total_txs; tx_id++) { + int proto_logged = 0; + void *tx = AppLayerParserGetTx(p->proto, alproto, alstate, tx_id); if (tx == NULL) { SCLogDebug("tx is NULL not logging");