From 21030b1d510dfedd153d1b10115c90e9b9b7902b9de1a7f9f6d9af3a8acfda80 Mon Sep 17 00:00:00 2001 From: AidarKC Date: Fri, 12 Jun 2026 23:48:38 +0400 Subject: [PATCH] =?UTF-8?q?ESP32:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20base64=20=D1=81=D0=B5=D1=80=D0=B8=D0=B0?= =?UTF-8?q?=D0=BB=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8E=20Solana=20=D1=82?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D0=B7=D0=B0=D0=BA=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shine_homeserver_main/shine_homeserver_main.ino | 12 ++++++++---- VERSION.properties | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ESP32/esp32/ESP32-S3-Touch-AMOLED-2.16/main-device/shine_homeserver_main/shine_homeserver_main.ino b/ESP32/esp32/ESP32-S3-Touch-AMOLED-2.16/main-device/shine_homeserver_main/shine_homeserver_main.ino index 708b358..6232505 100644 --- a/ESP32/esp32/ESP32-S3-Touch-AMOLED-2.16/main-device/shine_homeserver_main/shine_homeserver_main.ino +++ b/ESP32/esp32/ESP32-S3-Touch-AMOLED-2.16/main-device/shine_homeserver_main/shine_homeserver_main.ino @@ -585,13 +585,17 @@ static void sha256calc(const uint8_t *in, size_t len, uint8_t *out32) { } static String base64Std(const uint8_t *data, size_t len) { - char out[96] = {}; + size_t needed = ((len + 2) / 3) * 4 + 4; + std::vector out(needed, 0); size_t outLen = 0; - if (mbedtls_base64_encode(reinterpret_cast(out), sizeof(out), &outLen, data, len) != 0) { + if (mbedtls_base64_encode(out.data(), out.size(), &outLen, data, len) != 0) { return ""; } - out[min(outLen, sizeof(out) - 1)] = '\0'; - return String(out); + if (outLen >= out.size()) { + return ""; + } + out[outLen] = '\0'; + return String(reinterpret_cast(out.data())); } static String base58From32(const uint8_t *data32) { diff --git a/VERSION.properties b/VERSION.properties index 8539140..6f8bed5 100644 --- a/VERSION.properties +++ b/VERSION.properties @@ -1,2 +1,2 @@ -client.version=1.2.167 -server.version=1.2.156 +client.version=1.2.168 +server.version=1.2.157