Skip to content

Commit 8fbaf63

Browse files
authored
decodeIRJson bugfix: avoid buffer overrun #272
Increase the size of objKey to accommodate 32bit code number. The previous buffer size was too small.
1 parent 12b3bed commit 8fbaf63

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wled00/ir.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ the json file.
673673
*/
674674
void decodeIRJson(uint32_t code)
675675
{
676-
char objKey[10];
676+
char objKey[16] = {'\0'}; // WLEDMM: 13 chars, not 9! '"0x' + 'FFFFFFFF' + '":' + '\0'
677677
String cmdStr;
678678
JsonObject fdo;
679679
JsonObject jsonCmdObj;

0 commit comments

Comments
 (0)