From 47d5531d05302c861ce3199a5dfb30aac88006ac Mon Sep 17 00:00:00 2001 From: Stephan Enderlein Date: Sat, 15 Jul 2023 21:47:24 +0200 Subject: [PATCH] fix illegal memory access (pointers were missused) --- src/web/web.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/web/web.h b/src/web/web.h index 0b4f2616..70fae62e 100644 --- a/src/web/web.h +++ b/src/web/web.h @@ -701,14 +701,15 @@ class Web { // NRF Statistics stat = mApp->getStatistics(); - uint32_t *nrfSendCnt=NULL, *nrfRetransmits=NULL; - mApp->getNrfRadioCounters(nrfSendCnt, nrfRetransmits); + uint32_t nrfSendCnt; + uint32_t nrfRetransmits; + mApp->getNrfRadioCounters(&nrfSendCnt, &nrfRetransmits); metrics += radioStatistic(F("rx_success"), stat->rxSuccess); metrics += radioStatistic(F("rx_fail"), stat->rxFail); metrics += radioStatistic(F("rx_fail_answer"), stat->rxFailNoAnser); metrics += radioStatistic(F("frame_cnt"), stat->frmCnt); - metrics += radioStatistic(F("tx_cnt"), *nrfSendCnt); - metrics += radioStatistic(F("retrans_cnt"), *nrfRetransmits); + metrics += radioStatistic(F("tx_cnt"), nrfSendCnt); + metrics += radioStatistic(F("retrans_cnt"), nrfRetransmits); len = snprintf((char *)buffer,maxLen,"%s",metrics.c_str()); // Next is Inverter information