Enabled style and CERT-C addon for CPPCHECK (#869)

* Enabled style and CERT-C addon for CPPCHECK with some suppressions and fixed the defects found..
This commit is contained in:
Steve Karg
2024-12-10 07:56:24 -06:00
committed by GitHub
parent f38b75b389
commit d4cbec91e2
21 changed files with 79 additions and 73 deletions
+2 -2
View File
@@ -738,7 +738,7 @@ size_t bvlc_sc_encode_result(
uint8_t *error_header_marker,
uint16_t *error_class,
uint16_t *error_code,
uint8_t *utf8_details_string)
const uint8_t *utf8_details_string)
{
size_t offs;
@@ -1803,7 +1803,7 @@ static bool bvlc_sc_decode_hdr(
offs += hdr_opt_len;
}
if (message_len - offs <= 0) {
if (offs >= message_len) {
/* no payload */
return true;
}