Bugfix/add makefile lint fix warnings (#39)

* fix warnings indicated by scan-build lint tool

* add lint target to makefile using scan-build tool

* add lint into build script stages (note: uses scan-build-7)

* fix potential use of memory after it is freed
This commit is contained in:
Steve Karg
2020-01-28 18:48:29 -06:00
committed by GitHub
parent f8ce70470c
commit 914f502cff
18 changed files with 157 additions and 105 deletions
+2 -1
View File
@@ -394,7 +394,8 @@ uint32_t bacfile_instance_from_tsm(uint8_t invokeID)
len = apdu_decode_confirmed_service_request(&apdu[0], apdu_len,
&service_data, &service_choice, &service_request,
&service_request_len);
if (service_choice == SERVICE_CONFIRMED_ATOMIC_READ_FILE) {
if ((len > 0) &&
(service_choice == SERVICE_CONFIRMED_ATOMIC_READ_FILE)) {
len = arf_decode_service_request(
service_request, service_request_len, &data);
if (len > 0) {