mirror of
https://github.com/arendst/Tasmota.git
synced 2026-06-11 12:55:33 -04:00
On platforms without exceptions (-fno-exceptions, e.g. ESP8266), new[] returns nullptr on allocation failure instead of throwing. The missing NULL check caused a hard crash (load/store to address derived from nullptr+offset) whenever the token buffer could not be allocated. Fix all four paths that dereference _tokens without a NULL guard, and implement the existing TODO in parse() to ensure _token_len=0 invariant holds after OOM, consistent with the zero-error design.