unbound-1.22.0-14.fc43

List of Findings

Error: SHELLCHECK_WARNING (CWE-477): [#def1]
/usr/bin/unbound-control-setup:144:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  142|   [ -f server.cnf ] || fatal "cannot create openssl configuration"
#  143|   
#  144|-> if [ ! -f "$SVR_BASE.pem" -o $RECREATE -eq 1 ]; then
#  145|       openssl req \
#  146|               -new -x509 \

Error: SHELLCHECK_WARNING (CWE-477): [#def2]
/usr/bin/unbound-control-setup:180:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  178|   [ -f client.cnf ] || fatal "cannot create openssl configuration"
#  179|   
#  180|-> if [ ! -f "$CTL_BASE.pem" -o $RECREATE -eq 1 ]; then
#  181|       openssl x509 \
#  182|           -addtrust serverAuth \

Error: SHELLCHECK_WARNING (CWE-457): [#def3]
/usr/lib/dracut/modules.d/99unbound/module-setup.sh:20:18: warning[SC2154]: moddir is referenced but not assigned.
#   18|       # there is a synchronization point when other services are able
#   19|       # to make queries
#   20|->     inst_simple "$moddir"/unbound-initrd.conf /etc/systemd/system/unbound.service.d/unbound-initrd.conf
#   21|   
#   22|       # /etc and /var/lib do not have its variables

Error: SHELLCHECK_WARNING (CWE-457): [#def4]
/usr/lib/dracut/modules.d/99unbound/module-setup.sh:24:6: warning[SC2154]: systemdsystemunitdir is referenced but not assigned.
#   22|       # /etc and /var/lib do not have its variables
#   23|       inst_multiple -o \
#   24|->     "$systemdsystemunitdir"/unbound.service \
#   25|       /etc/unbound/conf.d/remote-control.conf \
#   26|       /etc/unbound/openssl-sha1.conf \

Error: SHELLCHECK_WARNING (CWE-457): [#def5]
/usr/lib/dracut/modules.d/99unbound/module-setup.sh:36:6: warning[SC2154]: sysusers is referenced but not assigned.
#   34|       /etc/unbound/unbound_server.key \
#   35|       /etc/unbound/unbound_server.pem \
#   36|->     "$sysusers"/unbound.conf \
#   37|       "$tmpfilesdir"/unbound.conf \
#   38|       /var/lib/unbound/root.key \

Error: SHELLCHECK_WARNING (CWE-457): [#def6]
/usr/lib/dracut/modules.d/99unbound/module-setup.sh:37:6: warning[SC2154]: tmpfilesdir is referenced but not assigned.
#   35|       /etc/unbound/unbound_server.pem \
#   36|       "$sysusers"/unbound.conf \
#   37|->     "$tmpfilesdir"/unbound.conf \
#   38|       /var/lib/unbound/root.key \
#   39|       unbound \

Error: SHELLCHECK_WARNING (CWE-457): [#def7]
/usr/lib/dracut/modules.d/99unbound/module-setup.sh:43:27: warning[SC2154]: initdir is referenced but not assigned.
#   41|       unbound-control
#   42|   
#   43|->     $SYSTEMCTL -q --root "$initdir" enable unbound.service
#   44|   }

Error: SHELLCHECK_WARNING (CWE-156): [#def8]
/usr/share/munin/plugins/unbound:145:36: warning[SC2046]: Quote this to prevent word splitting.
#  143|   			fi
#  144|   			if test $i -gt 1500; then
#  145|-> 				echo "error locking $lock" "=" `cat $lock`
#  146|   				rm -f $lock
#  147|   				exit 1

Error: SHELLCHECK_WARNING (CWE-156): [#def9]
/usr/share/munin/plugins/unbound:158:20: warning[SC2046]: Quote this to prevent word splitting.
#  156|   		get_value "time.now"
#  157|   		value="`echo $value | sed -e 's/\..*$//'`"
#  158|-> 		if test $now -lt `expr $value + $lee`; then
#  159|   			rm -f $lock
#  160|   			return

Error: SHELLCHECK_WARNING (CWE-156): [#def10]
/usr/share/munin/plugins/unbound:177:15: warning[SC2046]: Quote this to prevent word splitting.
#  175|   		exit 1
#  176|   	fi
#  177|-> 	if test ! -d `dirname $state`; then
#  178|   		echo no "($state directory does not exist)"
#  179|   		exit 1

Error: SHELLCHECK_WARNING (CWE-156): [#def11]
/usr/share/munin/plugins/unbound:405:19: warning[SC2046]: Quote this to prevent word splitting.
#  403|   	mn=`echo $1 | sed $ABBREV | tr . _`
#  404|   	get_value $1
#  405|-> 	echo "$mn.value" `echo scale=6';' $value / $elapsed | bc `
#  406|   }
#  407|   

Error: SHELLCHECK_WARNING (CWE-156): [#def12]
/usr/share/munin/plugins/unbound:412:19: warning[SC2046]: Quote this to prevent word splitting.
#  410|   	mn=`echo $1 | sed $ABBREV | tr . _`
#  411|   	value="`echo $2 | sed -e 's/^.*=//'`"
#  412|-> 	echo "$mn.value" `echo scale=6';' $value / $elapsed | bc `
#  413|   }
#  414|   

Error: SHELLCHECK_WARNING (CWE-149): [#def13]
/usr/share/munin/plugins/unbound:429:14: warning[SC2027]: The surrounding quotes actually unquote this. Remove or escape them.
#  427|   		total.num.cachehits total.num.prefetch num.query.tcp \
#  428|   		num.query.ipv6 unwanted.queries unwanted.replies; do
#  429|-> 		if grep "^"$x"=" $state >/dev/null 2>&1; then
#  430|   			print_qps $x
#  431|   		fi

Error: SHELLCHECK_WARNING (CWE-156): [#def14]
/usr/share/munin/plugins/unbound:494:20: warning[SC2046]: Quote this to prevent word splitting.
#  492|   histogram)
#  493|   	get_value total.num.cachehits
#  494|-> 	echo hcache.value `echo scale=6';' $value / $elapsed | bc `
#  495|   	r=0
#  496|   	for x in histogram.000000.000000.to.000000.000001 \

Error: SHELLCHECK_WARNING (CWE-156): [#def15]
/usr/share/munin/plugins/unbound:516:19: warning[SC2046]: Quote this to prevent word splitting.
#  514|   		r=`expr $r + $value`
#  515|   	done
#  516|-> 	echo h64ms.value `echo scale=6';' $r / $elapsed | bc `
#  517|   	get_value histogram.000000.065536.to.000000.131072
#  518|   	echo h128ms.value `echo scale=6';' $value / $elapsed | bc `

Error: SHELLCHECK_WARNING (CWE-156): [#def16]
/usr/share/munin/plugins/unbound:518:20: warning[SC2046]: Quote this to prevent word splitting.
#  516|   	echo h64ms.value `echo scale=6';' $r / $elapsed | bc `
#  517|   	get_value histogram.000000.065536.to.000000.131072
#  518|-> 	echo h128ms.value `echo scale=6';' $value / $elapsed | bc `
#  519|   	get_value histogram.000000.131072.to.000000.262144
#  520|   	echo h256ms.value `echo scale=6';' $value / $elapsed | bc `

Error: SHELLCHECK_WARNING (CWE-156): [#def17]
/usr/share/munin/plugins/unbound:520:20: warning[SC2046]: Quote this to prevent word splitting.
#  518|   	echo h128ms.value `echo scale=6';' $value / $elapsed | bc `
#  519|   	get_value histogram.000000.131072.to.000000.262144
#  520|-> 	echo h256ms.value `echo scale=6';' $value / $elapsed | bc `
#  521|   	get_value histogram.000000.262144.to.000000.524288
#  522|   	echo h512ms.value `echo scale=6';' $value / $elapsed | bc `

Error: SHELLCHECK_WARNING (CWE-156): [#def18]
/usr/share/munin/plugins/unbound:522:20: warning[SC2046]: Quote this to prevent word splitting.
#  520|   	echo h256ms.value `echo scale=6';' $value / $elapsed | bc `
#  521|   	get_value histogram.000000.262144.to.000000.524288
#  522|-> 	echo h512ms.value `echo scale=6';' $value / $elapsed | bc `
#  523|   	get_value histogram.000000.524288.to.000001.000000
#  524|   	echo h1s.value `echo scale=6';' $value / $elapsed | bc `

Error: SHELLCHECK_WARNING (CWE-156): [#def19]
/usr/share/munin/plugins/unbound:524:17: warning[SC2046]: Quote this to prevent word splitting.
#  522|   	echo h512ms.value `echo scale=6';' $value / $elapsed | bc `
#  523|   	get_value histogram.000000.524288.to.000001.000000
#  524|-> 	echo h1s.value `echo scale=6';' $value / $elapsed | bc `
#  525|   	get_value histogram.000001.000000.to.000002.000000
#  526|   	echo h2s.value `echo scale=6';' $value / $elapsed | bc `

Error: SHELLCHECK_WARNING (CWE-156): [#def20]
/usr/share/munin/plugins/unbound:526:17: warning[SC2046]: Quote this to prevent word splitting.
#  524|   	echo h1s.value `echo scale=6';' $value / $elapsed | bc `
#  525|   	get_value histogram.000001.000000.to.000002.000000
#  526|-> 	echo h2s.value `echo scale=6';' $value / $elapsed | bc `
#  527|   	get_value histogram.000002.000000.to.000004.000000
#  528|   	echo h4s.value `echo scale=6';' $value / $elapsed | bc `

Error: SHELLCHECK_WARNING (CWE-156): [#def21]
/usr/share/munin/plugins/unbound:528:17: warning[SC2046]: Quote this to prevent word splitting.
#  526|   	echo h2s.value `echo scale=6';' $value / $elapsed | bc `
#  527|   	get_value histogram.000002.000000.to.000004.000000
#  528|-> 	echo h4s.value `echo scale=6';' $value / $elapsed | bc `
#  529|   	get_value histogram.000004.000000.to.000008.000000
#  530|   	echo h8s.value `echo scale=6';' $value / $elapsed | bc `

Error: SHELLCHECK_WARNING (CWE-156): [#def22]
/usr/share/munin/plugins/unbound:530:17: warning[SC2046]: Quote this to prevent word splitting.
#  528|   	echo h4s.value `echo scale=6';' $value / $elapsed | bc `
#  529|   	get_value histogram.000004.000000.to.000008.000000
#  530|-> 	echo h8s.value `echo scale=6';' $value / $elapsed | bc `
#  531|   	r=0
#  532|   	for x in histogram.000008.000000.to.000016.000000 \

Error: SHELLCHECK_WARNING (CWE-156): [#def23]
/usr/share/munin/plugins/unbound:551:18: warning[SC2046]: Quote this to prevent word splitting.
#  549|   		r=`expr $r + $value`
#  550|   	done
#  551|-> 	echo h16s.value `echo scale=6';' $r / $elapsed | bc `
#  552|   	;;
#  553|   esac

Error: CPPCHECK_WARNING (CWE-590): [#def24]
unbound-1.22.0/libunbound/libunbound.c:375: error[autovarInvalidDeallocation]: Deallocation of an auto-variable (.) results in undefined behaviour.
#  373|   		a->super = &ctx->superalloc;
#  374|   		alloc_clear(a);
#  375|-> 		free(a);
#  376|   		a = na;
#  377|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
unbound-1.22.0/libunbound/libworker.c:545:17: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(why_bogus)'
unbound-1.22.0/libunbound/libworker.c:566:1: enter_function: entry to 'libworker_fg_done_cb'
unbound-1.22.0/libunbound/libworker.c:573:9: call_function: calling 'libworker_fillup_fg' from 'libworker_fg_done_cb'
#  543|   	q->res->was_ratelimited = was_ratelimited;
#  544|   	if(why_bogus)
#  545|-> 		q->res->why_bogus = strdup(why_bogus);
#  546|   	if(rcode != 0) {
#  547|   		q->res->rcode = rcode;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:645:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'iter'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11769:22: enter_function: entry to '_wrap__ub_resolve_async'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11778:9: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11793:8: call_function: calling 'SWIG_Python_UnpackTuple' from '_wrap__ub_resolve_async'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11793:8: return_function: returning to '_wrap__ub_resolve_async' from 'SWIG_Python_UnpackTuple'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11793:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11794:10: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11794:10: call_function: calling 'SWIG_Python_ConvertPtrAndOwn' from '_wrap__ub_resolve_async'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11794:10: return_function: returning to '_wrap__ub_resolve_async' from 'SWIG_Python_ConvertPtrAndOwn'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11795:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11798:3: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11798:3: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11799:10: call_function: calling 'SWIG_AsCharPtrAndSize' from '_wrap__ub_resolve_async'
#  643|     swig_module_info *iter = start;
#  644|     do {
#  645|->     if (iter->size) {
#  646|         size_t l = 0;
#  647|         size_t r = iter->size - 1;

Error: CPPCHECK_WARNING (CWE-457): [#def27]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:793: warning[uninitvar]: Uninitialized variable: buff
#  791|       *r = 0;
#  792|     }
#  793|->   return buff;
#  794|   }
#  795|   

Error: CPPCHECK_WARNING (CWE-476): [#def28]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:1689: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1687|       SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
# 1688|       /* the klass element */
# 1689|->     data->klass = obj;
# 1690|       SWIG_Py_INCREF(data->klass);
# 1691|       /* the newraw method and newargs arguments used to create a new raw instance */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:1689:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'data'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11688:22: enter_function: entry to 'ub_ctx_swigregister'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11690:8: call_function: calling 'SWIG_Python_UnpackTuple' from 'ub_ctx_swigregister'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11690:8: return_function: returning to 'ub_ctx_swigregister' from 'SWIG_Python_UnpackTuple'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11690:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11691:3: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11691:45: call_function: calling 'SwigPyClientData_New' from 'ub_ctx_swigregister'
# 1687|       SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
# 1688|       /* the klass element */
# 1689|->     data->klass = obj;
# 1690|       SWIG_Py_INCREF(data->klass);
# 1691|       /* the newraw method and newargs arguments used to create a new raw instance */

Error: CPPCHECK_WARNING (CWE-476): [#def30]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:1690: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1688|       /* the klass element */
# 1689|       data->klass = obj;
# 1690|->     SWIG_Py_INCREF(data->klass);
# 1691|       /* the newraw method and newargs arguments used to create a new raw instance */
# 1692|       if (PyClass_Check(obj)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:2910:6: warning[-Wanalyzer-malloc-leak]: leak of 'result'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11586:22: enter_function: entry to '_wrap_new_ub_stats_info'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11591:8: call_function: calling 'SWIG_Python_UnpackTuple' from '_wrap_new_ub_stats_info'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11591:8: return_function: returning to '_wrap_new_ub_stats_info' from 'SWIG_Python_UnpackTuple'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11591:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11592:36: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11592:36: acquire_memory: allocated here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11593:15: call_function: calling 'SWIG_Python_NewPointerObj' from '_wrap_new_ub_stats_info'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11593:15: return_function: returning to '_wrap_new_ub_stats_info' from 'SWIG_Python_NewPointerObj'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:2910:6: danger: 'result' leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
# 2908|   
# 2909|     robj = SwigPyObject_New(ptr, type, own);
# 2910|->   if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
# 2911|       PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
# 2912|       SWIG_Py_DECREF(robj);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:10990:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg1'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:10974:22: enter_function: entry to '_wrap_ub_server_stats_mem_quic_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:10977:9: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:10983:6: branch_false: following 'false' branch (when 'args' is non-NULL)...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:10985:10: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:10985:10: call_function: calling 'SWIG_Python_ConvertPtrAndOwn' from '_wrap_ub_server_stats_mem_quic_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:10985:10: return_function: returning to '_wrap_ub_server_stats_mem_quic_get' from 'SWIG_Python_ConvertPtrAndOwn'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:10986:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:10989:3: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:10989:3: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:10990:3: danger: dereference of NULL 'arg1'
#10988|     }
#10989|     arg1 = (struct ub_server_stats *)(argp1);
#10990|->   result = (long long) ((arg1)->mem_quic);
#10991|     resultobj = SWIG_From_long_SS_long((long long)(result));
#10992|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11044:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg1'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11028:22: enter_function: entry to '_wrap_ub_server_stats_qquic_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11031:9: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11037:6: branch_false: following 'false' branch (when 'args' is non-NULL)...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11039:10: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11039:10: call_function: calling 'SWIG_Python_ConvertPtrAndOwn' from '_wrap_ub_server_stats_qquic_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11039:10: return_function: returning to '_wrap_ub_server_stats_qquic_get' from 'SWIG_Python_ConvertPtrAndOwn'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11040:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11043:3: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11043:3: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11044:3: danger: dereference of NULL 'arg1'
#11042|     }
#11043|     arg1 = (struct ub_server_stats *)(argp1);
#11044|->   result = (long long) ((arg1)->qquic);
#11045|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11046|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11200:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg1'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11184:22: enter_function: entry to '_wrap_ub_stats_info_mesh_num_states_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11187:9: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11193:6: branch_false: following 'false' branch (when 'args' is non-NULL)...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11195:10: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11195:10: call_function: calling 'SWIG_Python_ConvertPtrAndOwn' from '_wrap_ub_stats_info_mesh_num_states_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11195:10: return_function: returning to '_wrap_ub_stats_info_mesh_num_states_get' from 'SWIG_Python_ConvertPtrAndOwn'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11196:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11199:3: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11199:3: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11200:3: danger: dereference of NULL 'arg1'
#11198|     }
#11199|     arg1 = (struct ub_stats_info *)(argp1);
#11200|->   result = (long long) ((arg1)->mesh_num_states);
#11201|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11202|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def35]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11254:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg1'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11238:22: enter_function: entry to '_wrap_ub_stats_info_mesh_num_reply_states_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11241:9: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11247:6: branch_false: following 'false' branch (when 'args' is non-NULL)...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11249:10: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11249:10: call_function: calling 'SWIG_Python_ConvertPtrAndOwn' from '_wrap_ub_stats_info_mesh_num_reply_states_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11249:10: return_function: returning to '_wrap_ub_stats_info_mesh_num_reply_states_get' from 'SWIG_Python_ConvertPtrAndOwn'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11250:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11253:3: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11253:3: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11254:3: danger: dereference of NULL 'arg1'
#11252|     }
#11253|     arg1 = (struct ub_stats_info *)(argp1);
#11254|->   result = (long long) ((arg1)->mesh_num_reply_states);
#11255|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11256|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def36]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11308:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg1'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11292:22: enter_function: entry to '_wrap_ub_stats_info_mesh_jostled_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11295:9: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11301:6: branch_false: following 'false' branch (when 'args' is non-NULL)...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11303:10: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11303:10: call_function: calling 'SWIG_Python_ConvertPtrAndOwn' from '_wrap_ub_stats_info_mesh_jostled_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11303:10: return_function: returning to '_wrap_ub_stats_info_mesh_jostled_get' from 'SWIG_Python_ConvertPtrAndOwn'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11304:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11307:3: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11307:3: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11308:3: danger: dereference of NULL 'arg1'
#11306|     }
#11307|     arg1 = (struct ub_stats_info *)(argp1);
#11308|->   result = (long long) ((arg1)->mesh_jostled);
#11309|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11310|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def37]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11362:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg1'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11346:22: enter_function: entry to '_wrap_ub_stats_info_mesh_dropped_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11349:9: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11355:6: branch_false: following 'false' branch (when 'args' is non-NULL)...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11357:10: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11357:10: call_function: calling 'SWIG_Python_ConvertPtrAndOwn' from '_wrap_ub_stats_info_mesh_dropped_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11357:10: return_function: returning to '_wrap_ub_stats_info_mesh_dropped_get' from 'SWIG_Python_ConvertPtrAndOwn'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11358:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11361:3: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11361:3: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11362:3: danger: dereference of NULL 'arg1'
#11360|     }
#11361|     arg1 = (struct ub_stats_info *)(argp1);
#11362|->   result = (long long) ((arg1)->mesh_dropped);
#11363|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11364|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11416:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg1'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11400:22: enter_function: entry to '_wrap_ub_stats_info_mesh_replies_sent_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11403:9: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11409:6: branch_false: following 'false' branch (when 'args' is non-NULL)...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11411:10: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11411:10: call_function: calling 'SWIG_Python_ConvertPtrAndOwn' from '_wrap_ub_stats_info_mesh_replies_sent_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11411:10: return_function: returning to '_wrap_ub_stats_info_mesh_replies_sent_get' from 'SWIG_Python_ConvertPtrAndOwn'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11412:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11415:3: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11415:3: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11416:3: danger: dereference of NULL 'arg1'
#11414|     }
#11415|     arg1 = (struct ub_stats_info *)(argp1);
#11416|->   result = (long long) ((arg1)->mesh_replies_sent);
#11417|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11418|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def39]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11470:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg1'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11454:22: enter_function: entry to '_wrap_ub_stats_info_mesh_replies_sum_wait_sec_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11457:9: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11463:6: branch_false: following 'false' branch (when 'args' is non-NULL)...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11465:10: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11465:10: call_function: calling 'SWIG_Python_ConvertPtrAndOwn' from '_wrap_ub_stats_info_mesh_replies_sum_wait_sec_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11465:10: return_function: returning to '_wrap_ub_stats_info_mesh_replies_sum_wait_sec_get' from 'SWIG_Python_ConvertPtrAndOwn'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11466:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11469:3: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11469:3: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11470:3: danger: dereference of NULL 'arg1'
#11468|     }
#11469|     arg1 = (struct ub_stats_info *)(argp1);
#11470|->   result = (long long) ((arg1)->mesh_replies_sum_wait_sec);
#11471|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11472|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def40]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11524:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg1'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11508:22: enter_function: entry to '_wrap_ub_stats_info_mesh_replies_sum_wait_usec_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11511:9: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11517:6: branch_false: following 'false' branch (when 'args' is non-NULL)...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11519:10: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11519:10: call_function: calling 'SWIG_Python_ConvertPtrAndOwn' from '_wrap_ub_stats_info_mesh_replies_sum_wait_usec_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11519:10: return_function: returning to '_wrap_ub_stats_info_mesh_replies_sum_wait_usec_get' from 'SWIG_Python_ConvertPtrAndOwn'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11520:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11523:3: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11523:3: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11524:3: danger: dereference of NULL 'arg1'
#11522|     }
#11523|     arg1 = (struct ub_stats_info *)(argp1);
#11524|->   result = (long long) ((arg1)->mesh_replies_sum_wait_usec);
#11525|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11526|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def41]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11578:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg1'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11562:22: enter_function: entry to '_wrap_ub_stats_info_mesh_time_median_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11565:9: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11571:6: branch_false: following 'false' branch (when 'args' is non-NULL)...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11573:10: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11573:10: call_function: calling 'SWIG_Python_ConvertPtrAndOwn' from '_wrap_ub_stats_info_mesh_time_median_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11573:10: return_function: returning to '_wrap_ub_stats_info_mesh_time_median_get' from 'SWIG_Python_ConvertPtrAndOwn'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11574:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11577:3: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11577:3: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11578:3: danger: dereference of NULL 'arg1'
#11576|     }
#11577|     arg1 = (struct ub_stats_info *)(argp1);
#11578|->   result = (double) ((arg1)->mesh_time_median);
#11579|     resultobj = SWIG_From_double((double)(result));
#11580|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def42]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11680:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'arg1'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11664:22: enter_function: entry to '_wrap_ub_ctx_dummy_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11667:9: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11673:6: branch_false: following 'false' branch (when 'args' is non-NULL)...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11675:10: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11675:10: call_function: calling 'SWIG_Python_ConvertPtrAndOwn' from '_wrap_ub_ctx_dummy_get'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11675:10: return_function: returning to '_wrap_ub_ctx_dummy_get' from 'SWIG_Python_ConvertPtrAndOwn'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11676:6: branch_false: following 'false' branch...
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11679:3: branch_false: ...to here
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11679:3: release_memory: 'argp1' is NULL
unbound-1.22.0/libunbound/python/libunbound_wrap.c:11680:3: danger: dereference of NULL 'arg1'
#11678|     }
#11679|     arg1 = (struct ub_ctx *)(argp1);
#11680|->   result = (int) ((arg1)->dummy);
#11681|     resultobj = SWIG_From_int((int)(result));
#11682|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def43]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12465:17: warning[-Wanalyzer-out-of-bounds]: buffer over-read
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12550:1: enter_function: entry to 'PyInit__unbound'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12629:3: call_function: calling 'SWIG_InitializeModule' from 'PyInit__unbound'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12629:3: return_function: returning to 'PyInit__unbound' from 'SWIG_InitializeModule'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12669:3: call_function: calling 'SWIG_Python_InstallConstants' from 'PyInit__unbound'
#12463|       PyObject *obj = 0;
#12464|       size_t i;
#12465|->     for (i = 0; constants[i].type; ++i) {
#12466|         switch(constants[i].type) {
#12467|         case SWIG_PY_POINTER:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def44]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12468:15: warning[-Wanalyzer-out-of-bounds]: buffer over-read
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12550:1: enter_function: entry to 'PyInit__unbound'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12629:3: call_function: calling 'SWIG_InitializeModule' from 'PyInit__unbound'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12629:3: return_function: returning to 'PyInit__unbound' from 'SWIG_InitializeModule'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12669:3: call_function: calling 'SWIG_Python_InstallConstants' from 'PyInit__unbound'
#12466|         switch(constants[i].type) {
#12467|         case SWIG_PY_POINTER:
#12468|->         obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
#12469|           break;
#12470|         case SWIG_PY_BINARY:

Error: GCC_ANALYZER_WARNING (CWE-126): [#def45]
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12471:15: warning[-Wanalyzer-out-of-bounds]: buffer over-read
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12550:1: enter_function: entry to 'PyInit__unbound'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12629:3: call_function: calling 'SWIG_InitializeModule' from 'PyInit__unbound'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12629:3: return_function: returning to 'PyInit__unbound' from 'SWIG_InitializeModule'
unbound-1.22.0/libunbound/python/libunbound_wrap.c:12669:3: call_function: calling 'SWIG_Python_InstallConstants' from 'PyInit__unbound'
#12469|           break;
#12470|         case SWIG_PY_BINARY:
#12471|->         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
#12472|           break;
#12473|         default:

Error: CPPCHECK_WARNING (CWE-457): [#def46]
unbound-1.22.0/pythonmod/interface.h:793: warning[uninitvar]: Uninitialized variable: buff
#  791|       *r = 0;
#  792|     }
#  793|->   return buff;
#  794|   }
#  795|   

Error: CPPCHECK_WARNING (CWE-476): [#def47]
unbound-1.22.0/pythonmod/interface.h:1689: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1687|       SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
# 1688|       /* the klass element */
# 1689|->     data->klass = obj;
# 1690|       SWIG_Py_INCREF(data->klass);
# 1691|       /* the newraw method and newargs arguments used to create a new raw instance */

Error: CPPCHECK_WARNING (CWE-476): [#def48]
unbound-1.22.0/pythonmod/interface.h:1690: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1688|       /* the klass element */
# 1689|       data->klass = obj;
# 1690|->     SWIG_Py_INCREF(data->klass);
# 1691|       /* the newraw method and newargs arguments used to create a new raw instance */
# 1692|       if (PyClass_Check(obj)) {

Error: CPPCHECK_WARNING (CWE-909): [#def49]
unbound-1.22.0/pythonmod/interface.h:15702: error[uninitStructMember]: Uninitialized struct member: arg2.first
#15700|       }
#15701|     }
#15702|->   if (arg1) (arg1)->control_ifs = arg2;
#15703|     resultobj = SWIG_Py_Void();
#15704|     return resultobj;

Error: CPPCHECK_WARNING (CWE-909): [#def50]
unbound-1.22.0/pythonmod/interface.h:15702: error[uninitStructMember]: Uninitialized struct member: arg2.last
#15700|       }
#15701|     }
#15702|->   if (arg1) (arg1)->control_ifs = arg2;
#15703|     resultobj = SWIG_Py_Void();
#15704|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-479): [#def51]
unbound-1.22.0/testcode/streamtcp.c:551:17: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to 'exit' from within signal handler
unbound-1.22.0/testcode/streamtcp.c:567:5: enter_function: entry to 'main'
unbound-1.22.0/testcode/streamtcp.c:544:19: enter_function: entry to 'sigh'
unbound-1.22.0/testcode/streamtcp.c:547:11: branch_true: following 'true' branch (when 'sig == 13')...
unbound-1.22.0/testcode/streamtcp.c:550:24: branch_true: ...to here
unbound-1.22.0/testcode/streamtcp.c:551:17: danger: call to 'exit' from within signal handler
#  549|   		/* simple cast to void will not silence Wunused-result */
#  550|   		(void)!write(STDOUT_FILENO, strpipe, strlen(strpipe));
#  551|-> 		exit(1);
#  552|   	}
#  553|   	str[21] = '0' + (sig/10)%10;

Error: GCC_ANALYZER_WARNING (CWE-479): [#def52]
unbound-1.22.0/testcode/streamtcp.c:557:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to 'exit' from within signal handler
unbound-1.22.0/testcode/streamtcp.c:567:5: enter_function: entry to 'main'
unbound-1.22.0/testcode/streamtcp.c:544:19: enter_function: entry to 'sigh'
unbound-1.22.0/testcode/streamtcp.c:547:11: branch_false: following 'false' branch (when 'sig != 13')...
unbound-1.22.0/testcode/streamtcp.c:553:25: branch_false: ...to here
unbound-1.22.0/testcode/streamtcp.c:557:9: danger: call to 'exit' from within signal handler
#  555|   	/* simple cast to void will not silence Wunused-result */
#  556|   	(void)!write(STDOUT_FILENO, str, strlen(str));
#  557|-> 	exit(1);
#  558|   }
#  559|   #endif /* SIGPIPE */

Error: GCC_ANALYZER_WARNING (CWE-457): [#def53]
unbound-1.22.0/util/configparser.c:2845:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'ub_c_ss'
unbound-1.22.0/util/configparser.c:2803:6: branch_true: following 'true' branch...
unbound-1.22.0/util/configparser.c:2809:34: branch_true: ...to here
unbound-1.22.0/util/configparser.c:2832:10: branch_false: following 'false' branch (when 'ub_c_stacksize <= 9999')...
unbound-1.22.0/util/configparser.c:2834:7: branch_false: ...to here
unbound-1.22.0/util/configparser.c:2843:12: branch_false: following 'false' branch (when 'yyptr' is non-NULL)...
unbound-1.22.0/util/configparser.c:2845:9: branch_false: ...to here
unbound-1.22.0/util/configparser.c:2845:9: danger: use of uninitialized value 'ub_c_ss' here
# 2843|           if (! yyptr)
# 2844|             YYNOMEM;
# 2845|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 2846|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 2847|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-457): [#def54]
unbound-1.22.0/util/configparser.c:2972:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*<unknown>'
unbound-1.22.0/util/configparser.c:2803:6: branch_false: following 'false' branch...
unbound-1.22.0/util/configparser.c:2867:6: branch_false: ...to here
unbound-1.22.0/util/configparser.c:2867:6: branch_false: following 'false' branch (when 'ub_c_state != 2')...
unbound-1.22.0/util/configparser.c:2870:3: branch_false: ...to here
unbound-1.22.0/util/configparser.c:2882:6: branch_true: following 'true' branch (when 'yyn == -302')...
unbound-1.22.0/util/configparser.c:2883:5: branch_true: ...to here
unbound-1.22.0/util/configparser.c:2952:6: branch_false: following 'false' branch (when 'yyn != 0')...
unbound-1.22.0/util/configparser.c:2954:3: branch_false: ...to here
unbound-1.22.0/util/configparser.c:2972:3: danger: use of uninitialized value '*<unknown>' here
# 2970|        unconditionally makes the parser a bit smaller, and it avoids a
# 2971|        GCC warning that YYVAL may be used uninitialized.  */
# 2972|->   yyval = yyvsp[1-yylen];
# 2973|   
# 2974|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def55]
unbound-1.22.0/util/data/msgencode.c:248:17: warning[-Wanalyzer-null-dereference]: dereference of NULL 'insertpt'
unbound-1.22.0/util/data/msgencode.c:997:1: enter_function: entry to 'reply_info_answer_encode'
unbound-1.22.0/util/data/msgencode.c:1025:11: branch_false: following 'false' branch (when 'udpsize > 11')...
unbound-1.22.0/util/data/msgencode.c:1029:27: branch_false: ...to here
unbound-1.22.0/util/data/msgencode.c:1031:11: branch_false: following 'false' branch...
unbound-1.22.0/util/data/msgencode.c:1033:11: branch_false: ...to here
unbound-1.22.0/util/data/msgencode.c:1044:13: call_function: calling 'reply_info_encode' from 'reply_info_answer_encode'
#  246|   	/* if we have a vine, hang the vine into the tree */
#  247|   	if(prevnode) {
#  248|-> 		*insertpt = prevnode;
#  249|   		prevnode->parent = closest;
#  250|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
unbound-1.22.0/util/ub_event_pluggable.c:387:16: warning[-Wanalyzer-malloc-leak]: leak of 'my_base'
unbound-1.22.0/util/ub_event_pluggable.c:353:64: acquire_memory: allocated here
unbound-1.22.0/util/ub_event_pluggable.c:356:12: branch_false: following 'false' branch (when 'my_base' is non-NULL)...
unbound-1.22.0/util/ub_event_pluggable.c:375:25: branch_false: ...to here
unbound-1.22.0/util/ub_event_pluggable.c:381:12: branch_false: following 'false' branch...
unbound-1.22.0/util/ub_event_pluggable.c:385:9: branch_false: ...to here
unbound-1.22.0/util/ub_event_pluggable.c:387:16: danger: 'my_base' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  385|   	my_base->super.magic = UB_EVENT_MAGIC;
#  386|   	my_base->super.vmt = &default_event_base_vmt;
#  387|-> 	return &my_base->super;
#  388|   }
#  389|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
unbound-1.22.0/util/ub_event_pluggable.c:405:16: warning[-Wanalyzer-malloc-leak]: leak of 'my_base'
unbound-1.22.0/util/ub_event_pluggable.c:397:64: acquire_memory: allocated here
unbound-1.22.0/util/ub_event_pluggable.c:400:12: branch_false: following 'false' branch (when 'my_base' is non-NULL)...
unbound-1.22.0/util/ub_event_pluggable.c:402:9: branch_false: ...to here
unbound-1.22.0/util/ub_event_pluggable.c:405:16: danger: 'my_base' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  403|   	my_base->super.vmt = &default_event_base_vmt;
#  404|   	my_base->base = base;
#  405|-> 	return &my_base->super;
#  406|   #endif
#  407|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
unbound-1.22.0/validator/val_neg.c:638:32: warning[-Wanalyzer-malloc-leak]: leak of 'first'
unbound-1.22.0/validator/val_neg.c:969:6: enter_function: entry to 'val_neg_addreferral'
unbound-1.22.0/validator/val_neg.c:979:18: call_function: calling 'reply_nsec_signer' from 'val_neg_addreferral'
unbound-1.22.0/validator/val_neg.c:979:18: return_function: returning to 'val_neg_addreferral' from 'reply_nsec_signer'
unbound-1.22.0/validator/val_neg.c:980:11: branch_false: following 'false' branch...
unbound-1.22.0/validator/val_neg.c:982:13: branch_false: ...to here
unbound-1.22.0/validator/val_neg.c:982:11: branch_false: following 'false' branch...
unbound-1.22.0/validator/val_neg.c:987:9: branch_false: ...to here
unbound-1.22.0/validator/val_neg.c:1008:34: branch_true: following 'true' branch...
unbound-1.22.0/validator/val_neg.c:1009:20: branch_true: ...to here
unbound-1.22.0/validator/val_neg.c:1015:17: call_function: calling 'neg_insert_data' from 'val_neg_addreferral'
#  636|   	/* create the new subtree, i is labelcount of current creation */
#  637|   	/* this creates a 'first' to z->parent=NULL list of zones */
#  638|-> 	for(i=labs; i!=tolabs; i--) {
#  639|   		/* create new item */
#  640|   		el = neg_setup_data_node(nm, nm_len, i);

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-172.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameunbound-1.22.0-14.fc43
store-results-to/tmp/tmp9jdkk1uf/unbound-1.22.0-14.fc43.tar.xz
time-created2025-04-25 16:00:08
time-finished2025-04-25 16:03:24
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp9jdkk1uf/unbound-1.22.0-14.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp9jdkk1uf/unbound-1.22.0-14.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9