Merge pull request #10087 from Jason2866/patch-1

Fix zigbee32 compile error
This commit is contained in:
Theo Arends 2020-12-07 20:38:32 +01:00 committed by GitHub
commit 0f79ddb6a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -479,10 +479,12 @@ void parseSingleTuyaAttribute(Z_attribute & attr, const SBuffer &buf,
attr.setUInt(buf.get32BigEndian(i));
break;
case 0x03: // String (we expect it is not ended with \00)
{
char str[len+1];
strncpy(str, buf.charptr(i), len);
str[len] = 0x00;
attr.setStr(str);
}
break;
case 0x05: // enum in 1/2/4 bytes, Big Endian
if (1 == len) {