From dcbed1423d141c32450d2e42b74ce0badc088b01 Mon Sep 17 00:00:00 2001 From: Brian Neradt Date: Wed, 8 Dec 2021 00:19:04 +0000 Subject: [PATCH] Traffic Dump: Use the correct transaction user index Traffic Dump has both session and transaction user data. In one of the calls to TSUserArgGet, it accidentally used the session index to access the transaction data. This could result in the corruption of another plugin's session data. This patch fixes this so the correct index is used. --- plugins/experimental/traffic_dump/transaction_data.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/experimental/traffic_dump/transaction_data.cc b/plugins/experimental/traffic_dump/transaction_data.cc index d3b3eee7b93..37fa7089de2 100644 --- a/plugins/experimental/traffic_dump/transaction_data.cc +++ b/plugins/experimental/traffic_dump/transaction_data.cc @@ -479,7 +479,7 @@ TransactionData::global_transaction_handler(TSCont contp, TSEvent event, void *e } case TS_EVENT_HTTP_TXN_CLOSE: { - TransactionData *txnData = static_cast(TSUserArgGet(txnp, SessionData::get_session_arg_index())); + TransactionData *txnData = static_cast(TSUserArgGet(txnp, transaction_arg_index)); if (!txnData) { TSError("[%s] No transaction data found for the close hook we registered for.", traffic_dump::debug_tag); break;