[AX25] Fixed uninitialized array

This commit is contained in:
jgromes 2020-07-04 12:18:02 +02:00
parent 4d87146123
commit b67060e424

View file

@ -266,6 +266,9 @@ int16_t AX25Client::sendFrame(AX25Frame* frame) {
uint8_t stuffedFrameBuff[RADIOLIB_STATIC_ARRAY_SIZE];
#endif
// initialize buffer to all zeros
memset(stuffedFrameBuff, 0x00, _preambleLen + 1 + (6*frameBuffLen)/5 + 2);
// stuff bits (skip preamble and both flags)
uint16_t stuffedFrameBuffLenBits = 8*(_preambleLen + 1);
uint8_t count = 0;