v5.13.0a - Fix JSON buffer size

5.13.0a
 * Fix JSON buffers size too small for execution in some
situations (#2580)
This commit is contained in:
Theo Arends 2018-05-01 11:28:36 +02:00
parent 962a50452c
commit d629b8ce2a
5 changed files with 8 additions and 5 deletions

View File

@ -13,7 +13,7 @@ If you like **Sonoff-Tasmota**, give it a star, or fork it and contribute!
### Development:
[![Build Status](https://img.shields.io/travis/arendst/Sonoff-Tasmota.svg)](https://travis-ci.org/arendst/Sonoff-Tasmota)
Current version is **5.13.0** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information.
Current version is **5.13.0a** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information.
### Quick install
Download one of the released binaries from https://github.com/arendst/Sonoff-Tasmota/releases and flash it to your hardware as documented in the wiki.

View File

@ -1,4 +1,7 @@
/* 5.13.0 20180430
/* 5.13.0a
* Fix JSON buffers size too small for execution in some situations (#2580)
*
* 5.13.0 20180430
* Change platformio option sonoff-ds18x20 to sonoff-allsensors enabling ds18x20 and all other sensors in one image
* Change status display of Ssid and SetOption
* Change default option SetOption15 from 0 to 1 providing better initial PWM experience

View File

@ -25,7 +25,7 @@
- Select IDE Tools - Flash Size: "1M (no SPIFFS)"
====================================================*/
#define VERSION 0x050D0000 // 5.13.0
#define VERSION 0x050D0001 // 5.13.0a
// Location specific includes
#include <core_version.h> // Arduino_Esp8266 version information (ARDUINO_ESP8266_RELEASE and ARDUINO_ESP8266_RELEASE_2_3_0)

View File

@ -354,7 +354,7 @@ boolean TimerCommand()
#ifndef USE_RULES
if (devices_present) {
#endif
StaticJsonBuffer<200> jsonBuffer;
StaticJsonBuffer<256> jsonBuffer;
JsonObject& root = jsonBuffer.parseObject(dataBufUc);
if (!root.success()) {
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_TIMER "%d\":\"" D_JSON_INVALID_JSON "\"}"), index); // JSON decode failed

View File

@ -181,7 +181,7 @@ bool RulesRuleMatch(String &event, String &rule)
}
// Step2: Search rule_task and rule_name
StaticJsonBuffer<400> jsonBuf;
StaticJsonBuffer<1024> jsonBuf;
JsonObject &root = jsonBuf.parseObject(event);
if (!root.success()) { return false; } // No valid JSON data