pms67 / HadesFCS

Complete flight control system designed from scratch. Hardware designed with KiCad.
http://philsal.co.uk
BSD 3-Clause "New" or "Revised" License
739 stars 246 forks source link

Bug in Communication/UAVDataLink #4

Closed zePanzerfaust closed 4 years ago

zePanzerfaust commented 4 years ago

In UAVDataLink.h, decodeBuffer is an uninitialized pointer which is passed to UAVDataLink_decodeCOBS, which uses this pointer like an array.

uint8_t UAVDataLink_unpack(uint8_t *receivedPacket, uint8_t receivedPacketLength, uint8_t *packetHeader, uint8_t *payload) {
    /* Decode COBS framing */
    uint8_t *decodeBuffer;
    UAVDataLink_decodeCOBS(receivedPacket, receivedPacketLength, decodeBuffer);
    ...
}
pms67 commented 4 years ago

Thanks for spotting that! Should be fixed now.