board_identity: Fix UUID format function buffer overflow bug

- Previously, not having a proper boundary check caused overflows in the
buffer (wrong memory access)
- Moreoever, negative size values getting introduced to snprintf &
strncat were also being truncated to unsigned value, hence causing
overflow, so index check needed to be added before both functions
- Fixed typo in board_common.h
This commit is contained in:
Junwoo Hwang
2022-09-15 13:06:15 -04:00
committed by Daniel Agar
parent facf01d69d
commit f5215e8207
7 changed files with 28 additions and 25 deletions
@@ -946,7 +946,7 @@ int board_get_mfguid_formated(char *format_buffer, int size); // DEPRICATED use
int board_get_px4_guid(px4_guid_t guid);
/************************************************************************************
* Name: board_get_mfguid_formated
* Name: board_get_px4_guid_formated
*
* Description:
* All boards either provide a way to retrieve a formatted string of the