Task #284 - added.err

back to task #284
download
Error: GCC_ANALYZER_WARNING (CWE-126):
bluez-5.76-build/bluez-5.76/emulator/bthost.c: scope_hint: In function ‘queue_command’
bluez-5.76-build/bluez-5.76/emulator/bthost.c:571:52: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
bluez-5.76-build/bluez-5.76/emulator/bthost.c:571:52: note: read of 8 bytes from after the end of ‘iov’
bluez-5.76-build/bluez-5.76/emulator/bthost.c:571:52: note: valid subscripts for ‘iov’ are ‘[0]’ to ‘[2]’
#                                              └──────────────────────────┘
#                                                           ^
#  569|   
#  570|   	for (i = 0; i < iovlen; i++) {
#  571|-> 		memcpy(cmd->data + cmd->len, iov[i].iov_base, iov[i].iov_len);
#  572|   		cmd->len += iov[i].iov_len;
#  573|   	}

Error: GCC_ANALYZER_WARNING (CWE-126):
bluez-5.76-build/bluez-5.76/emulator/bthost.c:571:69: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
bluez-5.76-build/bluez-5.76/emulator/bthost.c:571:69: note: read of 8 bytes from after the end of ‘iov’
bluez-5.76-build/bluez-5.76/emulator/bthost.c:571:69: note: valid subscripts for ‘iov’ are ‘[0]’ to ‘[2]’
#                                              └──────────────────────────┘
#                                                           ^
#  569|   
#  570|   	for (i = 0; i < iovlen; i++) {
#  571|-> 		memcpy(cmd->data + cmd->len, iov[i].iov_base, iov[i].iov_len);
#  572|   		cmd->len += iov[i].iov_len;
#  573|   	}

Error: CLANG_WARNING:
bluez-5.76-build/bluez-5.76/profiles/audio/media.c:1046:7: warning[unix.Malloc]: Use of memory after it is freed
# 1044|   		struct pac_select_data *data;
# 1045|   
# 1046|-> 		if (req->cb != pac_select_cb) {
# 1047|   			l = g_slist_next(l);
# 1048|   			continue;

Error: CPPCHECK_WARNING:
bluez-5.76-build/bluez-5.76/profiles/gap/gas.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476):
bluez-5.76-build/bluez-5.76/src/adv_monitor.c:976:48: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 56)’
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
bluez-5.76-build/bluez-5.76/src/adv_monitor.c:20: included_from: Included from here.
/usr/include/glib-2.0/glib/gstrfuncs.h:180:30: note: in definition of macro ‘g_str_has_prefix’
bluez-5.76-build/bluez-5.76/src/adv_monitor.c:695:19: note: in expansion of macro ‘new0’
bluez-5.76-build/bluez-5.76/src/adv_monitor.c:975:35: note: in expansion of macro ‘malloc0’
#  974|   
#  975|   	monitor->merged_pattern = malloc0(sizeof(*monitor->merged_pattern));
#  976|-> 	monitor->merged_pattern->current_state = MERGED_PATTERN_STATE_STABLE;
#  977|   	monitor->merged_pattern->next_state = MERGED_PATTERN_STATE_STABLE;
#  978|   

Error: GCC_ANALYZER_WARNING (CWE-476):
bluez-5.76-build/bluez-5.76/src/shared/bap.c: scope_hint: In function 'foreach_ascs_service'
bluez-5.76-build/bluez-5.76/src/shared/bap.c:4742:23: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
# 4740|   	struct bt_ascs *ascs = bap_get_ascs(bap);
# 4741|   
# 4742|-> 	ascs->service = attr;
# 4743|   
# 4744|   	gatt_db_service_set_claimed(attr, true);

Error: GCC_ANALYZER_WARNING (CWE-465):
bluez-5.76-build/bluez-5.76/src/shared/bap.c: scope_hint: In function 'bap_bcast_stream_new'
bluez-5.76-build/bluez-5.76/src/shared/bap.c:5403:20: warning[-Wanalyzer-deref-before-check]: check of 'lpac' for NULL after already dereferencing it
# 5401|   
# 5402|   		bt_bap_foreach_pac(bap, BT_BAP_BCAST_SINK, match_pac, &match);
# 5403|-> 		if ((!match.lpac) || (!lpac))
# 5404|   			return NULL;
# 5405|   

Error: CPPCHECK_WARNING:
bluez-5.76-build/bluez-5.76/src/shared/uhid.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.