From: Victor Julien Date: Thu, 17 Dec 2015 09:34:17 +0000 (+0100) Subject: tx logging: fix potential missed logging issue X-Git-Tag: suricata-3.0.1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a866d5d915bf472df535ed592218178ef5db0bc2;p=thirdparty%2Fsuricata.git 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 --- 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");