libteam-1.32-10.fc42

List of Findings

Error: SHELLCHECK_WARNING (CWE-563): [#def1]
/usr/bin/bond2team:30:1: warning[SC2034]: ARGC appears unused. Verify use (or export if used externally).
#   28|   
#   29|   #defaults
#   30|-> ARGC=$#
#   31|   
#   32|   FORMAT_IFCFG=0

Error: SHELLCHECK_WARNING (CWE-563): [#def2]
/usr/bin/bond2team:55:1: warning[SC2034]: PORTS_OPTS appears unused. Verify use (or export if used externally).
#   53|   # array: ( 'port ifname', 'opt1', 'opt2', 'optn', 'opt4', 'port ifname', ... )
#   54|   PORT_LIST=
#   55|-> PORTS_OPTS=()
#   56|   PRIMARY=
#   57|   PRIMARY_RESELECT=

Error: SHELLCHECK_WARNING (CWE-569): [#def3]
/usr/bin/bond2team:159:25: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
#  157|   pr_error()
#  158|   {
#  159|-> 	pr ${PR_ERR} "ERROR: " $*
#  160|   }
#  161|   

Error: SHELLCHECK_WARNING (CWE-569): [#def4]
/usr/bin/bond2team:164:28: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
#  162|   pr_warn()
#  163|   {
#  164|-> 	pr ${PR_WARN} "WARNING: " $*
#  165|   }
#  166|   

Error: SHELLCHECK_WARNING (CWE-569): [#def5]
/usr/bin/bond2team:169:25: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
#  167|   pr_info()
#  168|   {
#  169|-> 	pr ${PR_INFO} "INFO: " $*
#  170|   }
#  171|   

Error: SHELLCHECK_WARNING (CWE-569): [#def6]
/usr/bin/bond2team:174:25: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
#  172|   pr_dbg()
#  173|   {
#  174|-> 	pr ${PR_DBG} "DEBUG: " $*
#  175|   }
#  176|   

Error: SHELLCHECK_WARNING (CWE-670): [#def7]
/usr/bin/bond2team:191:13: warning[SC2128]: Expanding an array without an index only gives the first element.
#  189|   
#  190|   	if [ ! -d "${OUTPUT_TMP_DIR}" ]; then
#  191|-> 		pr_error "${FUNCNAME} can't create dir ${OUTPUT_TMP_DIR}"
#  192|   		return 1
#  193|   	fi

Error: SHELLCHECK_WARNING (CWE-670): [#def8]
/usr/bin/bond2team:198:13: warning[SC2128]: Expanding an array without an index only gives the first element.
#  196|   	touch ${tmpfile}
#  197|   	if [ ! -f ${tmpfile} ]; then
#  198|-> 		pr_error "${FUNCNAME} can't create file ${tmpfile}"
#  199|   		return 1
#  200|   	fi

Error: SHELLCHECK_WARNING (CWE-685): [#def9]
/usr/bin/bond2team:217:1: warning[SC2120]: clean_up references arguments, but none are ever passed.
#  215|   }
#  216|   
#  217|-> clean_up()
#  218|   {
#  219|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def10]
/usr/bin/bond2team:219:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  217|   clean_up()
#  218|   {
#  219|-> 	pr_dbg "${FUNCNAME} $*"
#  220|   	for tmpf in $(seq 0 $((${#TMP_FILES[@]} - 1)))
#  221|   	do

Error: SHELLCHECK_WARNING (CWE-685): [#def11]
/usr/bin/bond2team:278:1: warning[SC2120]: ifcfg_overwrite_files references arguments, but none are ever passed.
#  276|   }
#  277|   
#  278|-> ifcfg_overwrite_files()
#  279|   {
#  280|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def12]
/usr/bin/bond2team:280:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  278|   ifcfg_overwrite_files()
#  279|   {
#  280|-> 	pr_dbg "${FUNCNAME} $*"
#  281|   
#  282|   	/bin/cp -f ${OUTPUT_TMP_DIR}/ifcfg* ${OUTPUT_DIR}

Error: SHELLCHECK_WARNING (CWE-670): [#def13]
/usr/bin/bond2team:287:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  285|   ifcfg_get_bond_opts()
#  286|   {
#  287|-> 	pr_dbg "${FUNCNAME} $*"
#  288|   	local ifcfg=$1
#  289|   

Error: SHELLCHECK_WARNING (CWE-670): [#def14]
/usr/bin/bond2team:291:11: warning[SC2128]: Expanding an array without an index only gives the first element.
#  289|   
#  290|   	if [ -n "${BONDING_OPTS}" ]; then
#  291|-> 		pr_dbg "${FUNCNAME} bonding_opts=${BONDING_OPTS}"
#  292|   		return 0
#  293|   	fi

Error: SHELLCHECK_WARNING (CWE-670): [#def15]
/usr/bin/bond2team:309:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  307|   	fi
#  308|   
#  309|-> 	pr_dbg "${FUNCNAME} bonding_opts=${BONDING_OPTS}"
#  310|   	return 0
#  311|   }

Error: SHELLCHECK_WARNING (CWE-670): [#def16]
/usr/bin/bond2team:320:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  318|   vfile_load_ifcfg()
#  319|   {
#  320|-> 	pr_dbg "${FUNCNAME} $*"
#  321|   	local ifcfg=$1
#  322|   

Error: SHELLCHECK_WARNING (CWE-140): [#def17]
/usr/bin/bond2team:333:10: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
#  331|   	oIFS="$IFS"
#  332|   	IFS=$'\n'
#  333|-> 	VFILE=( $(LANG=C \
#  334|   		grep -iv 'BONDING_OPTS\|SLAVE\|MASTER\|TYPE\|DEVICETYPE\|TEAM' \
#  335|   		$ifcfg ))

Error: SHELLCHECK_WARNING (CWE-670): [#def18]
/usr/bin/bond2team:341:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  339|   vfile_write_to_file()
#  340|   {
#  341|-> 	pr_dbg "${FUNCNAME} $*"
#  342|   	local output=$1
#  343|   	for ln in $(seq 0 $((${#VFILE[@]} - 1)))

Error: SHELLCHECK_WARNING (CWE-685): [#def19]
/usr/bin/bond2team:371:1: warning[SC2120]: vfile_get_device references arguments, but none are ever passed.
#  369|   }
#  370|   
#  371|-> vfile_get_device()
#  372|   {
#  373|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def20]
/usr/bin/bond2team:373:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  371|   vfile_get_device()
#  372|   {
#  373|-> 	pr_dbg "${FUNCNAME} $*"
#  374|   	if [ ${MODE} -eq ${MODE_NOIFCFG} ]; then
#  375|   		pr_dbg "${FUNCNAME} using DEVICE=${MASTER}"

Error: SHELLCHECK_WARNING (CWE-670): [#def21]
/usr/bin/bond2team:375:11: warning[SC2128]: Expanding an array without an index only gives the first element.
#  373|   	pr_dbg "${FUNCNAME} $*"
#  374|   	if [ ${MODE} -eq ${MODE_NOIFCFG} ]; then
#  375|-> 		pr_dbg "${FUNCNAME} using DEVICE=${MASTER}"
#  376|   		DEVICE=${MASTER}
#  377|   		return 0

Error: SHELLCHECK_WARNING (CWE-670): [#def22]
/usr/bin/bond2team:387:12: warning[SC2128]: Expanding an array without an index only gives the first element.
#  385|   			local name="${name_line%%[ #	]*}"
#  386|   			DEVICE=${name}
#  387|-> 			pr_dbg "${FUNCNAME} from file: DEVICE=${DEVICE}"
#  388|   			return 0
#  389|   		fi

Error: SHELLCHECK_WARNING (CWE-670): [#def23]
/usr/bin/bond2team:411:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  409|   vfile_add_line()
#  410|   {
#  411|-> 	pr_dbg "${FUNCNAME} $*"
#  412|   	local pos=${#VFILE[*]}
#  413|   	VFILE[${pos}]="$1"

Error: SHELLCHECK_WARNING (CWE-670): [#def24]
/usr/bin/bond2team:447:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  445|   team_port_set_devtype()
#  446|   {
#  447|-> 	pr_dbg "${FUNCNAME} $*"
#  448|   	local master=$1
#  449|   	vfile_add_line "DEVICETYPE=\"TeamPort\""

Error: SHELLCHECK_WARNING (CWE-670): [#def25]
/usr/bin/bond2team:455:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  453|   team_port_set_config()
#  454|   {
#  455|-> 	pr_dbg "${FUNCNAME} $*"
#  456|   	local port=$1
#  457|   	local team_port_config=""

Error: SHELLCHECK_WARNING (CWE-685): [#def26]
/usr/bin/bond2team:505:1: warning[SC2120]: team_master_set_devtype references arguments, but none are ever passed.
#  503|   }
#  504|   
#  505|-> team_master_set_devtype()
#  506|   {
#  507|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def27]
/usr/bin/bond2team:507:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  505|   team_master_set_devtype()
#  506|   {
#  507|-> 	pr_dbg "${FUNCNAME} $*"
#  508|   	vfile_add_line "DEVICETYPE=\"Team\""
#  509|   }

Error: SHELLCHECK_WARNING (CWE-685): [#def28]
/usr/bin/bond2team:511:1: warning[SC2120]: team_master_set_config references arguments, but none are ever passed.
#  509|   }
#  510|   
#  511|-> team_master_set_config()
#  512|   {
#  513|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def29]
/usr/bin/bond2team:513:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  511|   team_master_set_config()
#  512|   {
#  513|-> 	pr_dbg "${FUNCNAME} $*"
#  514|   	local team_config="'{ \"runner\" : { "
#  515|   	local nr_opt=0

Error: SHELLCHECK_WARNING (CWE-670): [#def30]
/usr/bin/bond2team:563:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  561|   team_ifcfg_dump_stdout()
#  562|   {
#  563|-> 	pr_dbg "${FUNCNAME} $*"
#  564|   	local dev=$1
#  565|   	if ! ifcfg_dump_stdout ${dev}; then

Error: SHELLCHECK_WARNING (CWE-670): [#def31]
/usr/bin/bond2team:574:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  572|   team_ifcfg_write_file()
#  573|   {
#  574|-> 	pr_dbg "${FUNCNAME} $*"
#  575|   	local dev=$1
#  576|   	OUTPUT_FILE=

Error: SHELLCHECK_WARNING (CWE-685): [#def32]
/usr/bin/bond2team:595:1: warning[SC2120]: team_master_ifcfg_create references arguments, but none are ever passed.
#  593|   }
#  594|   
#  595|-> team_master_ifcfg_create()
#  596|   {
#  597|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def33]
/usr/bin/bond2team:597:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  595|   team_master_ifcfg_create()
#  596|   {
#  597|-> 	pr_dbg "${FUNCNAME} $*"
#  598|   	if ! team_master_set_devtype; then
#  599|   		return 1

Error: SHELLCHECK_WARNING (CWE-670): [#def34]
/usr/bin/bond2team:611:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  609|   team_ifcfg_write()
#  610|   {
#  611|-> 	pr_dbg "${FUNCNAME} $*"
#  612|   	local dev=${1}
#  613|   

Error: SHELLCHECK_WARNING (CWE-685): [#def35]
/usr/bin/bond2team:623:1: warning[SC2120]: team_ifcfg_deliver references arguments, but none are ever passed.
#  621|   }
#  622|   
#  623|-> team_ifcfg_deliver()
#  624|   {
#  625|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def36]
/usr/bin/bond2team:625:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  623|   team_ifcfg_deliver()
#  624|   {
#  625|-> 	pr_dbg "${FUNCNAME} $*"
#  626|   	if to_stdout; then
#  627|   		return 0

Error: SHELLCHECK_WARNING (CWE-670): [#def37]
/usr/bin/bond2team:708:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  706|   teamd_write_file()
#  707|   {
#  708|-> 	pr_dbg "${FUNCNAME} $*"
#  709|   	local dev=$1
#  710|   	OUTPUT_FILE=

Error: SHELLCHECK_WARNING (CWE-685): [#def38]
/usr/bin/bond2team:725:1: warning[SC2120]: teamd_config_write references arguments, but none are ever passed.
#  723|   
#  724|   
#  725|-> teamd_config_write()
#  726|   {
#  727|   	pr_dbg "${FUNCNAME} $*"

Error: SHELLCHECK_WARNING (CWE-670): [#def39]
/usr/bin/bond2team:727:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  725|   teamd_config_write()
#  726|   {
#  727|-> 	pr_dbg "${FUNCNAME} $*"
#  728|   
#  729|   	if to_stdout; then

Error: SHELLCHECK_WARNING (CWE-670): [#def40]
/usr/bin/bond2team:753:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  751|   teamd_port_add()
#  752|   {
#  753|-> 	pr_dbg "${FUNCNAME} $*"
#  754|   	local dev=${1}
#  755|   	local lastone=${2}

Error: SHELLCHECK_WARNING (CWE-670): [#def41]
/usr/bin/bond2team:794:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  792|   runner_add_opt()
#  793|   {
#  794|-> 	pr_dbg "${FUNCNAME} $*"
#  795|   	local pos=${#RUNNER_OPTS[*]}
#  796|   	RUNNER_OPTS[${pos}]="$1"

Error: SHELLCHECK_WARNING (CWE-670): [#def42]
/usr/bin/bond2team:801:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  799|   runner_parse_adselect()
#  800|   {
#  801|-> 	pr_dbg "${FUNCNAME} $*"
#  802|   	local value=$1
#  803|   

Error: SHELLCHECK_WARNING (CWE-670): [#def43]
/usr/bin/bond2team:822:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  820|   runner_parse_failovermac()
#  821|   {
#  822|-> 	pr_dbg "${FUNCNAME} $*"
#  823|   	local value=$1
#  824|   

Error: SHELLCHECK_WARNING (CWE-670): [#def44]
/usr/bin/bond2team:845:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  843|   runner_parse_lacprate()
#  844|   {
#  845|-> 	pr_dbg "${FUNCNAME} $*"
#  846|   	local value=$1
#  847|   

Error: SHELLCHECK_WARNING (CWE-670): [#def45]
/usr/bin/bond2team:864:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  862|   runner_parse_xmit_policy()
#  863|   {
#  864|-> 	pr_dbg "${FUNCNAME} $*"
#  865|   	local value=$1
#  866|   

Error: SHELLCHECK_WARNING (CWE-670): [#def46]
/usr/bin/bond2team:885:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  883|   runner_parse_mode()
#  884|   {
#  885|-> 	pr_dbg "${FUNCNAME} $*"
#  886|   	local value=$1
#  887|   

Error: SHELLCHECK_WARNING (CWE-670): [#def47]
/usr/bin/bond2team:921:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  919|   runner_parse_opt()
#  920|   {
#  921|-> 	pr_dbg "${FUNCNAME} $*"
#  922|   	local param=$1
#  923|   	local value=$2

Error: SHELLCHECK_WARNING (CWE-670): [#def48]
/usr/bin/bond2team:950:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  948|   lwatch_add_opt()
#  949|   {
#  950|-> 	pr_dbg "${FUNCNAME} $*"
#  951|   	local pos=${#LWATCH_OPTS[*]}
#  952|   	LWATCH_OPTS[${pos}]="$1"

Error: SHELLCHECK_WARNING (CWE-670): [#def49]
/usr/bin/bond2team:957:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  955|   lwatch_parse_arp_validate()
#  956|   {
#  957|-> 	pr_dbg "${FUNCNAME} $*"
#  958|   	local value=$1
#  959|   

Error: SHELLCHECK_WARNING (CWE-670): [#def50]
/usr/bin/bond2team:985:10: warning[SC2128]: Expanding an array without an index only gives the first element.
#  983|   	#FIXME: supports only one arp_ip_target address.
#  984|   	# otherwise a new linkwatch section must be create
#  985|-> 	pr_dbg "${FUNCNAME} $*"
#  986|   	local ip_addrs=$1
#  987|   	local ip_list=${ip_addrs//,/ }

Error: SHELLCHECK_WARNING (CWE-140): [#def51]
/usr/bin/bond2team:988:18: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.
#  986|   	local ip_addrs=$1
#  987|   	local ip_list=${ip_addrs//,/ }
#  988|-> 	local ip_array=($ip_list)
#  989|   	if [ ${#ip_array[*]} -ne 1 ]; then
#  990|   		pr_error "parameter arp_ip_target= with multiple IP addresses is not supported"

Error: SHELLCHECK_WARNING (CWE-670): [#def52]
/usr/bin/bond2team:1002:10: warning[SC2128]: Expanding an array without an index only gives the first element.
# 1000|   lwatch_parse_opt()
# 1001|   {
# 1002|-> 	pr_dbg "${FUNCNAME} $*"
# 1003|   	local param=$1
# 1004|   	local value=$2

Error: SHELLCHECK_WARNING (CWE-670): [#def53]
/usr/bin/bond2team:1037:10: warning[SC2128]: Expanding an array without an index only gives the first element.
# 1035|   port_parse_opt()
# 1036|   {
# 1037|-> 	pr_dbg "${FUNCNAME} $*"
# 1038|   	local param=$1
# 1039|   	local value=$2

Error: SHELLCHECK_WARNING (CWE-670): [#def54]
/usr/bin/bond2team:1070:10: warning[SC2128]: Expanding an array without an index only gives the first element.
# 1068|   {
# 1069|   	local bonding_opts=$1
# 1070|-> 	pr_dbg "${FUNCNAME} $*"
# 1071|   
# 1072|   	for arg in $bonding_opts

Error: SHELLCHECK_WARNING (CWE-477): [#def55]
/usr/bin/bond2team:1177:25: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
# 1175|   done
# 1176|   
# 1177|-> if [ -n "${OUTPUT_DIR}" -a ! -d "${OUTPUT_DIR}" ]; then
# 1178|   	pr_error "Invalid output diretory: ${OUTPUT_DIR}"
# 1179|   	usage

Error: SHELLCHECK_WARNING (CWE-477): [#def56]
/usr/bin/bond2team:1183:21: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
# 1181|   fi
# 1182|   
# 1183|-> if [ -z "${MASTER}" -a -z "${BONDING_OPTS}" ]; then
# 1184|   	pr_error "No master interface or bonding options specified"
# 1185|   	usage

Error: SHELLCHECK_WARNING (CWE-477): [#def57]
/usr/bin/bond2team:1194:45: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
# 1192|   fi
# 1193|   
# 1194|-> if [ ${OUTPUT_FORMAT} -eq ${FORMAT_JANSSON} -a -z "${MASTER}" ]; then
# 1195|   	MASTER="team0"
# 1196|   fi

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
libteam-1.32-build/libteam-1.32/include/private/list.h:47:25: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 56)’
libteam-1.32-build/libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
libteam-1.32-build/libteam-1.32/teamd/teamd.c:46: included_from: Included from here.
libteam-1.32-build/libteam-1.32/teamd/teamd.h:56:37: note: in expansion of macro ‘teamd_log_dbgx’
libteam-1.32-build/libteam-1.32/teamd/teamd.c:1899:9: note: in expansion of macro ‘teamd_log_dbg’
libteam-1.32-build/libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
libteam-1.32-build/libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
libteam-1.32-build/libteam-1.32/teamd/teamd.c:475:9: note: in expansion of macro ‘list_for_each_node_entry’
libteam-1.32-build/libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
libteam-1.32-build/libteam-1.32/teamd/teamd.c: scope_hint: In function ‘__teamd_loop_callback_fd_add’
#   45|   	new_node->prev = prev_node;
#   46|   	new_node->next = next_node;
#   47|-> 	prev_node->next = new_node;
#   48|   	next_node->prev = new_node;
#   49|   }

Error: GCC_ANALYZER_WARNING (CWE-124): [#def59]
libteam-1.32-build/libteam-1.32/teamd/teamd_state.c:28: included_from: Included from here.
libteam-1.32-build/libteam-1.32/include/private/misc.h: scope_hint: In function ‘hwaddr_str’
libteam-1.32-build/libteam-1.32/include/private/misc.h:64:14: warning[-Wanalyzer-out-of-bounds]: heap-based buffer underwrite
#   62|   	if (len)
#   63|   		str--;
#   64|-> 	*str = '\0';
#   65|   }
#   66|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def60]
libteam-1.32-build/libteam-1.32/teamd/teamd_dbus.c: scope_hint: In function ‘wakeup_dispatch’
libteam-1.32-build/libteam-1.32/teamd/teamd_dbus.c:396:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dp’
libteam-1.32-build/libteam-1.32/teamd/teamd_dbus.c:28: included_from: Included from here.
#  394|   
#  395|   retry:
#  396|-> 	err = write(dp->fd_w, "a", 1);
#  397|   	if (err == -1 && errno == EINTR)
#  398|   		goto retry;

Error: CPPCHECK_WARNING (CWE-401): [#def61]
libteam-1.32-build/libteam-1.32/teamd/teamd_events.c:256: error[memleak]: Memory leak: watch
#  254|   	watch->priv = priv;
#  255|   	list_add_tail(&ctx->event_watch_list, &watch->list);
#  256|-> 	return 0;
#  257|   }
#  258|   

Error: CPPCHECK_WARNING (CWE-457): [#def62]
libteam-1.32-build/libteam-1.32/teamd/teamd_lw_tipc.c:72: error[uninitvar]: Uninitialized variable: l->peer
#   70|   
#   71|   	LIST_FOREACH(l, &priv->links, next) {
#   72|-> 		if ((tipc_cluster(l->peer) == tipc_cluster(addr)) && l->up)
#   73|   			return true;
#   74|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def63]
libteam-1.32-build/libteam-1.32/teamd/teamd_lw_tipc.c: scope_hint: In function ‘lw_tipc_filter_events’
libteam-1.32-build/libteam-1.32/teamd/teamd_lw_tipc.c:125:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘remote’
#  123|   		tipc_cluster(lnr->peer), tipc_node(lnr->peer));
#  124|   	remote = strstr(name, needle);
#  125|-> 	*(remote++) = '\0';
#  126|   	bearer = strchr(name, ':') + 1;
#  127|   	return strcmp(bearer, tipc_ppriv->bearer);

Error: CPPCHECK_WARNING (CWE-401): [#def64]
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_activebackup.c:622: error[memleak]: Memory leak: info
#  620|   	info->ifindex = tdport->ifindex;
#  621|   	teamd_workq_schedule_work(ctx, &info->workq);
#  622|-> 	return 0;
#  623|   }
#  624|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def65]
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c:27: included_from: Included from here.
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c: scope_hint: In function ‘get_lacp_port_prio_info’
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c:418:53: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*prio_info.system_priority’
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c: scope_hint: In function ‘get_lacp_port_prio_info’
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c: scope_hint: In function ‘get_lacp_port_prio_info’
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c: scope_hint: In function ‘get_lacp_port_prio_info’
#  416|   
#  417|   	/* adjust values for further memcmp comparison */
#  418|-> 	prio_info->system_priority = ntohs(prio_info->system_priority);
#  419|   	prio_info->key = 0;
#  420|   	prio_info->port_priority = ntohs(prio_info->port_priority);

Error: CPPCHECK_WARNING (CWE-401): [#def66]
libteam-1.32-build/libteam-1.32/teamd/teamd_runner_lacp.c:1819: error[memleak]: Memory leak: info
# 1817|   	info->ifindex = gsc->info.tdport->ifindex;
# 1818|   	teamd_workq_schedule_work(ctx, &info->workq);
# 1819|-> 	return 0;
# 1820|   }
# 1821|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def67]
libteam-1.32-build/libteam-1.32/utils/teamdctl.c: scope_hint: In function ‘print_cmd’
libteam-1.32-build/libteam-1.32/utils/teamdctl.c:935:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘command_type’
libteam-1.32-build/libteam-1.32/utils/teamdctl.c: scope_hint: In function ‘print_cmd’
#  933|   static void print_cmd(struct command_type *command_type)
#  934|   {
#  935|-> 	if (command_type->parent_id != ID_CMDTYPE_NONE) {
#  936|   		print_cmd(__get_cmd_by_id(command_type->parent_id));
#  937|   		pr_out(" ");

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-187.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namelibteam-1.32-10.fc42
store-results-to/tmp/tmp1ay1r0ca/libteam-1.32-10.fc42.tar.xz
time-created2024-11-13 01:47:23
time-finished2024-11-13 01:48:53
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp1ay1r0ca/libteam-1.32-10.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp1ay1r0ca/libteam-1.32-10.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9