We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8dc4290 commit 097043aCopy full SHA for 097043a
src/utility/GAP.cpp
@@ -56,7 +56,7 @@ void GAPClass::setManufacturerData(const uint8_t manufacturerData[], int manufac
56
57
void GAPClass::setManufacturerData(const uint16_t companyId, const uint8_t manufacturerData[], int manufacturerDataLength)
58
{
59
- uint8_t tmpManufacturerData[manufacturerDataLength + 2];
+ uint8_t* tmpManufacturerData = (uint8_t*)malloc(manufacturerDataLength + 2);
60
tmpManufacturerData[0] = companyId & 0xff;
61
tmpManufacturerData[1] = companyId >> 8;
62
memcpy(&tmpManufacturerData[2], manufacturerData, manufacturerDataLength);
0 commit comments