From 85acdfe1090668a3afd0e46cf34ce1b92146e9d3 Mon Sep 17 00:00:00 2001 From: bogiton <34060135+bogiton@users.noreply.github.com> Date: Sat, 2 Nov 2019 18:06:02 +0000 Subject: [PATCH] Update hf_bog.c --- armsrc/Standalone/hf_bog.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/armsrc/Standalone/hf_bog.c b/armsrc/Standalone/hf_bog.c index 5e84d4cc1..ac0bb7749 100644 --- a/armsrc/Standalone/hf_bog.c +++ b/armsrc/Standalone/hf_bog.c @@ -216,13 +216,11 @@ void RAMFUNC SniffAndStore(uint8_t param) { if (auth_attempts > 0) { if (DBGLEVEL > 1) Dbprintf("[!] Authentication attempts = %u", auth_attempts); - size_t size = 4 * auth_attempts; - uint8_t *buf = BigBuf_malloc(size); if (!exists_in_spiffs((char *)HF_BOG_LOGFILE)) { - rdv40_spiffs_write((char *)HF_BOG_LOGFILE, buf, size, RDV40_SPIFFS_SAFETY_SAFE); + rdv40_spiffs_write((char *)HF_BOG_LOGFILE, capturedPwds, 4 * auth_attempts, RDV40_SPIFFS_SAFETY_SAFE); } else { - rdv40_spiffs_append((char *)HF_BOG_LOGFILE, buf, size, RDV40_SPIFFS_SAFETY_SAFE); + rdv40_spiffs_append((char *)HF_BOG_LOGFILE, capturedPwds, 4 * auth_attempts, RDV40_SPIFFS_SAFETY_SAFE); } }