Fixed defects

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/libworker.c: scope_hint: In function ‘libworker_fillup_fg’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/libworker.c:559:35: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(why_bogus)’
#  557|   	q->res->was_ratelimited = was_ratelimited;
#  558|   	if(why_bogus)
#  559|-> 		q->res->why_bogus = strdup(why_bogus);
#  560|   	if(rcode != 0) {
#  561|   		q->res->rcode = rcode;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c: scope_hint: In function ‘SWIG_MangledTypeQueryModule’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:630:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘iter’
/usr/include/python3.13/tupleobject.h:39: included_from: Included from here.
/usr/include/python3.13/Python.h:84: included_from: Included from here.
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1290:20: note: in expansion of macro ‘PyTuple_GET_SIZE’
/usr/include/python3.13/Python.h:19: included_from: Included from here.
/usr/include/python3.13/cpython/tupleobject.h:22:28: note: in expansion of macro ‘_PyTuple_CAST’
/usr/include/python3.13/cpython/tupleobject.h:23:12: note: in expansion of macro ‘Py_SIZE’
/usr/include/python3.13/cpython/tupleobject.h:23:12: note: in expansion of macro ‘Py_SIZE’
/usr/include/python3.13/cpython/tupleobject.h:23:12: note: in expansion of macro ‘Py_SIZE’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1290:20: note: in expansion of macro ‘PyTuple_GET_SIZE’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11645:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11645:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11645:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:3411:12: note: in expansion of macro ‘SWIG_TypeQuery’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:3411:12: note: in expansion of macro ‘SWIG_TypeQuery’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:2979:37: note: in expansion of macro ‘SWIG_GetModule’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:2979:37: note: in expansion of macro ‘SWIG_GetModule’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:2979:37: note: in expansion of macro ‘SWIG_GetModule’
#  628|     swig_module_info *iter = start;
#  629|     do {
#  630|->     if (iter->size) {
#  631|         size_t l = 0;
#  632|         size_t r = iter->size - 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c: scope_hint: In function ‘SwigPyClientData_New’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1658:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘data’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11542:45: note: in expansion of macro ‘SWIG_NewClientData’
# 1656|       SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
# 1657|       /* the klass element */
# 1658|->     data->klass = obj;
# 1659|       Py_INCREF(data->klass);
# 1660|       /* the newraw method and newargs arguments used to create a new raw instance */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c: scope_hint: In function ‘_wrap_new_ub_stats_info’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:2867:6: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11444:15: note: in expansion of macro ‘SWIG_NewPointerObj’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11444:15: note: in expansion of macro ‘SWIG_NewPointerObj’
# 2865|   
# 2866|     robj = SwigPyObject_New(ptr, type, own);
# 2867|->   if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
# 2868|       PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
# 2869|       Py_DECREF(robj);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c: scope_hint: In function ‘_wrap_ub_stats_info_mesh_num_states_get’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11051:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11046:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11046:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11046:10: note: in expansion of macro ‘SWIG_ConvertPtr’
#11049|     }
#11050|     arg1 = (struct ub_stats_info *)(argp1);
#11051|->   result = (long long) ((arg1)->mesh_num_states);
#11052|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11053|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c: scope_hint: In function ‘_wrap_ub_stats_info_mesh_num_reply_states_get’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11105:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11100:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11100:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11100:10: note: in expansion of macro ‘SWIG_ConvertPtr’
#11103|     }
#11104|     arg1 = (struct ub_stats_info *)(argp1);
#11105|->   result = (long long) ((arg1)->mesh_num_reply_states);
#11106|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11107|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c: scope_hint: In function ‘_wrap_ub_stats_info_mesh_jostled_get’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11159:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11154:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11154:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11154:10: note: in expansion of macro ‘SWIG_ConvertPtr’
#11157|     }
#11158|     arg1 = (struct ub_stats_info *)(argp1);
#11159|->   result = (long long) ((arg1)->mesh_jostled);
#11160|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11161|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c: scope_hint: In function ‘_wrap_ub_stats_info_mesh_dropped_get’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11213:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11208:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11208:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11208:10: note: in expansion of macro ‘SWIG_ConvertPtr’
#11211|     }
#11212|     arg1 = (struct ub_stats_info *)(argp1);
#11213|->   result = (long long) ((arg1)->mesh_dropped);
#11214|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11215|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c: scope_hint: In function ‘_wrap_ub_stats_info_mesh_replies_sent_get’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11267:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11262:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11262:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11262:10: note: in expansion of macro ‘SWIG_ConvertPtr’
#11265|     }
#11266|     arg1 = (struct ub_stats_info *)(argp1);
#11267|->   result = (long long) ((arg1)->mesh_replies_sent);
#11268|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11269|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c: scope_hint: In function ‘_wrap_ub_stats_info_mesh_replies_sum_wait_sec_get’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11321:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11316:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11316:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11316:10: note: in expansion of macro ‘SWIG_ConvertPtr’
#11319|     }
#11320|     arg1 = (struct ub_stats_info *)(argp1);
#11321|->   result = (long long) ((arg1)->mesh_replies_sum_wait_sec);
#11322|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11323|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c: scope_hint: In function ‘_wrap_ub_stats_info_mesh_replies_sum_wait_usec_get’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11375:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11370:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11370:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11370:10: note: in expansion of macro ‘SWIG_ConvertPtr’
#11373|     }
#11374|     arg1 = (struct ub_stats_info *)(argp1);
#11375|->   result = (long long) ((arg1)->mesh_replies_sum_wait_usec);
#11376|     resultobj = SWIG_From_long_SS_long((long long)(result));
#11377|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c: scope_hint: In function ‘_wrap_ub_stats_info_mesh_time_median_get’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11429:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11424:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11424:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11424:10: note: in expansion of macro ‘SWIG_ConvertPtr’
#11427|     }
#11428|     arg1 = (struct ub_stats_info *)(argp1);
#11429|->   result = (double) ((arg1)->mesh_time_median);
#11430|     resultobj = SWIG_From_double((double)(result));
#11431|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c: scope_hint: In function ‘_wrap_ub_ctx_dummy_get’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11531:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg1’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11526:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11526:10: note: in expansion of macro ‘SWIG_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:1143:57: note: in expansion of macro ‘SWIG_Python_ConvertPtr’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/libunbound/python/libunbound_wrap.c:11526:10: note: in expansion of macro ‘SWIG_ConvertPtr’
#11529|     }
#11530|     arg1 = (struct ub_ctx *)(argp1);
#11531|->   result = (int) ((arg1)->dummy);
#11532|     resultobj = SWIG_From_int((int)(result));
#11533|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-479): [#def14]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/testcode/streamtcp.c: scope_hint: In function ‘sigh’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/testcode/streamtcp.c:547:17: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/testcode/streamtcp.c:547:17: note: ‘_exit’ is a possible signal-safe alternative for ‘exit’
#  545|   		/* simple cast to void will not silence Wunused-result */
#  546|   		(void)!write(STDOUT_FILENO, strpipe, strlen(strpipe));
#  547|-> 		exit(1);
#  548|   	}
#  549|   	str[21] = '0' + (sig/10)%10;

Error: GCC_ANALYZER_WARNING (CWE-479): [#def15]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/testcode/streamtcp.c:553:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/testcode/streamtcp.c:553:9: note: ‘_exit’ is a possible signal-safe alternative for ‘exit’
#  551|   	/* simple cast to void will not silence Wunused-result */
#  552|   	(void)!write(STDOUT_FILENO, str, strlen(str));
#  553|-> 	exit(1);
#  554|   }
#  555|   #endif /* SIGPIPE */

Error: GCC_ANALYZER_WARNING (CWE-457): [#def16]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/configparser.c: scope_hint: In function ‘ub_c_parse’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/configparser.c:1156:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ub_c_ss’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/configparser.c:1141:9: note: in expansion of macro ‘YYCOPY’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/configparser.c:2781:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/configparser.c:1156:25: note: in definition of macro ‘YYCOPY’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/configparser.c:2781:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/configparser.c:1141:9: note: in expansion of macro ‘YYCOPY’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/configparser.c:2781:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
# 1154|   #  if defined __GNUC__ && 1 < __GNUC__
# 1155|   #   define YYCOPY(Dst, Src, Count) \
# 1156|->       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
# 1157|   #  else
# 1158|   #   define YYCOPY(Dst, Src, Count)              \

Error: GCC_ANALYZER_WARNING (CWE-457): [#def17]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/configparser.c:2907:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
# 2905|        unconditionally makes the parser a bit smaller, and it avoids a
# 2906|        GCC warning that YYVAL may be used uninitialized.  */
# 2907|->   yyval = yyvsp[1-yylen];
# 2908|   
# 2909|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def18]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/data/msgencode.c: scope_hint: In function ‘compress_tree_store’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/data/msgencode.c:244:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘insertpt’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/data/msgencode.c:50: included_from: Included from here.
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/data/msgencode.c: scope_hint: In function ‘compress_tree_store’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/data/msgencode.c: scope_hint: In function ‘compress_tree_store’
#  242|   	/* if we have a vine, hang the vine into the tree */
#  243|   	if(prevnode) {
#  244|-> 		*insertpt = prevnode;
#  245|   		prevnode->parent = closest;
#  246|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/ub_event_pluggable.c: scope_hint: In function ‘ub_default_event_base’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/ub_event_pluggable.c:387:16: warning[-Wanalyzer-malloc-leak]: leak of ‘my_base’
#  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): [#def20]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/ub_event_pluggable.c: scope_hint: In function ‘ub_libevent_event_base’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/util/ub_event_pluggable.c:405:16: warning[-Wanalyzer-malloc-leak]: leak of ‘my_base’
#  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): [#def21]
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/validator/val_neg.c: scope_hint: In function ‘neg_data_chain’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/validator/val_neg.c:638:33: warning[-Wanalyzer-malloc-leak]: leak of ‘first’
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/config.h:1161: included_from: Included from here.
unbound-1.19.1-build/unbound-1.19.1/unbound-1.19.1/validator/val_neg.c:44: included_from: Included from here.
#  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-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-64.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-nameunbound-1.20.0-2.fc41
diffbase-store-results-to/tmp/tmpzik8jk4q/unbound-1.20.0-2.fc41.tar.xz
diffbase-time-created2024-07-03 18:16:30
diffbase-time-finished2024-07-03 18:20:08
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpzik8jk4q/unbound-1.20.0-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpzik8jk4q/unbound-1.20.0-2.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-64.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameunbound-1.19.1-3.fc40
store-results-to/tmp/tmp3dcue2bm/unbound-1.19.1-3.fc40.tar.xz
time-created2024-07-03 18:12:04
time-finished2024-07-03 18:16:02
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp3dcue2bm/unbound-1.19.1-3.fc40.tar.xz' '--gcc-analyze' '/tmp/tmp3dcue2bm/unbound-1.19.1-3.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9