From 2ddbc7c7fad2704ef20c3ee8eb436ee06d317d89 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Fri, 17 May 2024 12:47:14 +0200 Subject: [PATCH] Fix watchdog restart or freeze if ``displaytext`` is more than 128 characters (#21401) --- CHANGELOG.md | 3 ++- RELEASENOTES.md | 2 ++ tasmota/tasmota_xdrv_driver/xdrv_13_display.ino | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7172e506..6afd704cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. ## [14.0.0.1] ### Added -- Enabled watchdog for ESP32 and variants +- Enabled watchdog for ESP32 and variants (#21422) ### Breaking Changed @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. ### Fixed - Domoticz re-subscribe on MQTT reconnect. Regression from v13.4.0.3 (#21281) +- Watchdog restart or freeze if ``displaytext`` is more than 128 characters (#21401) ### Removed - Support of old insecure fingerprint algorithm. Deprecated since v8.4.0 (#21417) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index cdc46fa50..4dcac22cf 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -121,6 +121,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm ## Changelog v14.0.0.1 ### Added +- Enabled watchdog for ESP32 and variants [#21422](https://github.com/arendst/Tasmota/issues/21422) ### Breaking Changed @@ -129,6 +130,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm ### Fixed - Domoticz re-subscribe on MQTT reconnect. Regression from v13.4.0.3 [#21281](https://github.com/arendst/Tasmota/issues/21281) +- Watchdog restart or freeze if ``displaytext`` is more than 128 characters (#21401)[#21401](https://github.com/arendst/Tasmota/issues/21401) ### Removed - Support of old insecure fingerprint algorithm. Deprecated since v8.4.0 [#21417](https://github.com/arendst/Tasmota/issues/21417) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_13_display.ino b/tasmota/tasmota_xdrv_driver/xdrv_13_display.ino index 8a59b48b8..682ecf7c8 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_13_display.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_13_display.ino @@ -497,7 +497,11 @@ void DisplayText(void) } } else { // copy chars - if (dp < (linebuf + DISPLAY_BUFFER_COLS)) { *dp++ = *cp++; } + if (dp < (linebuf + DISPLAY_BUFFER_COLS)) { + *dp++ = *cp++; + } else { + break; + } } } else { // check escapes