openwsman-2.8.1-10.fc44

List of Findings

Error: SHELLCHECK_WARNING (CWE-477): [#def1]
/etc/openwsman/owsmangencert.sh:9:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#    7|   CNFFILE=/etc/openwsman/ssleay.cnf
#    8|   
#    9|-> if [ "$1" != "--force" -a -f $KEYFILE ]; then
#   10|     echo "$KEYFILE exists!  Use \"$0 --force.\""
#   11|     exit 0

Error: SHELLCHECK_WARNING (CWE-88): [#def2]
/etc/openwsman/owsmangencert.sh:28:23: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   26|   # certificate is created
#   27|   
#   28|-> openssl req -days 365 $@ -config $CNFFILE \
#   29|     -newkey rsa:2048 -x509 -nodes -out $CERTFILE \
#   30|     -keyout $KEYFILE

Error: SHELLCHECK_WARNING (CWE-477): [#def3]
/etc/openwsman/owsmantestcert.sh:5:8: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#    3|   if [ ! -f "/etc/openwsman/serverkey.pem" ]; then
#    4|     if [ -f "/etc/ssl/servercerts/servercert.pem" \
#    5|->        -a -f "/etc/ssl/servercerts/serverkey.pem" ]; then
#    6|       echo "Using common server certificate /etc/ssl/servercerts/servercert.pem"
#    7|       ln -s /etc/ssl/servercerts/server{cert,key}.pem /etc/openwsman

Error: COMPILER_WARNING (CWE-686): [#def4]
openwsman-2.8.1/build/CMakeFiles/CMakeScratch/TryCompile-P2acqN/CheckFunctionExists.c:7:3: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘alloca’; expected ‘void *(long unsigned int)’

Error: COMPILER_WARNING (CWE-686): [#def5]
openwsman-2.8.1/build/CMakeFiles/CMakeScratch/TryCompile-kGrIsQ/CheckFunctionExists.c:7:3: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘bcopy’; expected ‘void(const void *, void *, long unsigned int)’

Error: CPPCHECK_WARNING (CWE-476): [#def6]
openwsman-2.8.1/build/bindings/perl/openwsman_wrap.c:1450: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mg->mg_virtual
# 1448|     mg = mg_find(sv,'U');
# 1449|     mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
# 1450|->   mg->mg_virtual->svt_get = (SwigMagicFunc) get;
# 1451|     mg->mg_virtual->svt_set = (SwigMagicFunc) set;
# 1452|     mg->mg_virtual->svt_len = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def7]
openwsman-2.8.1/build/bindings/perl/openwsman_wrap.c:2757: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2755|         s->fault_code = code;
# 2756|       if (msg)
# 2757|->       s->fault_msg = strdup(msg);
# 2758|       if (detail < 0
# 2759|           || detail > OWSMAN_SYSTEM_ERROR) {

Error: CPPCHECK_WARNING (CWE-457): [#def8]
openwsman-2.8.1/build/bindings/perl/openwsman_wrap.c:10587: error[legacyUninitvar]: Uninitialized variable: arg1
#10585|         }
#10586|       }
#10587|->     result = (char *)wsmc_transport_get_auth_name(arg1);
#10588|       ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
#10589|       XSRETURN(argvi);

Error: CPPCHECK_WARNING (CWE-457): [#def9]
openwsman-2.8.1/build/bindings/perl/openwsman_wrap.c:10647: error[legacyUninitvar]: Uninitialized variable: arg1
#10645|         }
#10646|       }
#10647|->     result = (char *)wsman_transport_get_last_error_string(arg1);
#10648|       ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
#10649|       XSRETURN(argvi);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:724:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘iter’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14915:22: enter_function: entry to ‘_wrap_uri_prefix’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14925:6: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)...
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14927:10: branch_false: ...to here
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14927:10: call_function: calling ‘SWIG_AsCharPtrAndSize’ from ‘_wrap_uri_prefix’
#  722|     swig_module_info *iter = start;
#  723|     do {
#  724|->     if (iter->size) {
#  725|         size_t l = 0;
#  726|         size_t r = iter->size - 1;

Error: CPPCHECK_WARNING (CWE-457): [#def11]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:872: warning[uninitvar]: Uninitialized variable: buff
#  870|       *r = 0;
#  871|     }
#  872|->   return buff;
#  873|   }
#  874|   

Error: CPPCHECK_WARNING (CWE-476): [#def12]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:1901: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1899|       SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
# 1900|       /* the klass element */
# 1901|->     data->klass = obj;
# 1902|       SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:1901:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘data’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14775:22: enter_function: entry to ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: return_function: returning to ‘Client_swigregister’ from ‘SWIG_Python_UnpackTuple’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:6: branch_false: following ‘false’ branch...
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:3: branch_false: ...to here
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:51: call_function: calling ‘SwigPyClientData_New’ from ‘Client_swigregister’
# 1899|       SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
# 1900|       /* the klass element */
# 1901|->     data->klass = obj;
# 1902|       SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */

Error: CPPCHECK_WARNING (CWE-476): [#def14]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:1902: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1900|       /* the klass element */
# 1901|       data->klass = obj;
# 1902|->     SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */
# 1904|       if (PyClass_Check(obj)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:1904:9: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14775:22: enter_function: entry to ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: return_function: returning to ‘Client_swigregister’ from ‘SWIG_Python_UnpackTuple’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:6: branch_false: following ‘false’ branch...
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:3: branch_false: ...to here
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:51: call_function: calling ‘SwigPyClientData_New’ from ‘Client_swigregister’
# 1902|       SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */
# 1904|->     if (PyClass_Check(obj)) {
# 1905|         data->newraw = 0;
# 1906|         SWIG_Py_INCREF(obj);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:1909:22: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14775:22: enter_function: entry to ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: return_function: returning to ‘Client_swigregister’ from ‘SWIG_Python_UnpackTuple’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:6: branch_false: following ‘false’ branch...
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:3: branch_false: ...to here
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:51: call_function: calling ‘SwigPyClientData_New’ from ‘Client_swigregister’
# 1907|         data->newargs = obj;
# 1908|       } else {
# 1909|->       data->newraw = PyObject_GetAttrString(data->klass, "__new__");
# 1910|         if (data->newraw) {
# 1911|           data->newargs = PyTuple_New(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:1911:25: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14775:22: enter_function: entry to ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: return_function: returning to ‘Client_swigregister’ from ‘SWIG_Python_UnpackTuple’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:6: branch_false: following ‘false’ branch...
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:3: branch_false: ...to here
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:51: call_function: calling ‘SwigPyClientData_New’ from ‘Client_swigregister’
# 1909|         data->newraw = PyObject_GetAttrString(data->klass, "__new__");
# 1910|         if (data->newraw) {
# 1911|->         data->newargs = PyTuple_New(1);
# 1912|           if (data->newargs) {
# 1913|             SWIG_Py_INCREF(obj);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:1927:21: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14775:22: enter_function: entry to ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: return_function: returning to ‘Client_swigregister’ from ‘SWIG_Python_UnpackTuple’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:6: branch_false: following ‘false’ branch...
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:3: branch_false: ...to here
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:51: call_function: calling ‘SwigPyClientData_New’ from ‘Client_swigregister’
# 1925|       }
# 1926|       /* the destroy method, aka as the C++ delete method */
# 1927|->     data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
# 1928|       if (PyErr_Occurred()) {
# 1929|         PyErr_Clear();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:1928:9: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14775:22: enter_function: entry to ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: return_function: returning to ‘Client_swigregister’ from ‘SWIG_Python_UnpackTuple’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:6: branch_false: following ‘false’ branch...
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:3: branch_false: ...to here
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:51: call_function: calling ‘SwigPyClientData_New’ from ‘Client_swigregister’
# 1926|       /* the destroy method, aka as the C++ delete method */
# 1927|       data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
# 1928|->     if (PyErr_Occurred()) {
# 1929|         PyErr_Clear();
# 1930|         data->destroy = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:1929:7: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14775:22: enter_function: entry to ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘Client_swigregister’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:8: return_function: returning to ‘Client_swigregister’ from ‘SWIG_Python_UnpackTuple’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14777:6: branch_false: following ‘false’ branch...
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:3: branch_false: ...to here
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:14778:51: call_function: calling ‘SwigPyClientData_New’ from ‘Client_swigregister’
# 1927|       data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
# 1928|       if (PyErr_Occurred()) {
# 1929|->       PyErr_Clear();
# 1930|         data->destroy = 0;
# 1931|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:4637:5: warning[-Wanalyzer-malloc-leak]: leak of ‘s’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:9452:22: enter_function: entry to ‘_wrap_new_Status’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:9468:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘_wrap_new_Status’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:9468:8: return_function: returning to ‘_wrap_new_Status’ from ‘SWIG_Python_UnpackTuple’
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:9468:6: branch_false: following ‘false’ branch...
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:9469:7: branch_false: ...to here
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:9483:6: branch_false: following ‘false’ branch...
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:9490:12: branch_false: ...to here
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:9490:12: call_function: calling ‘new__WsmanStatus’ from ‘_wrap_new_Status’
# 4635|   SWIGINTERN struct _WsmanStatus *new__WsmanStatus(int code,int detail,char const *msg){
# 4636|       WsmanStatus *s = (WsmanStatus *)malloc(sizeof(WsmanStatus));
# 4637|->     wsman_status_init(s);
# 4638|       if (code)
# 4639|         s->fault_code = code;

Error: CPPCHECK_WARNING (CWE-476): [#def22]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:4641: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 4639|         s->fault_code = code;
# 4640|       if (msg)
# 4641|->       s->fault_msg = strdup(msg);
# 4642|       if (detail < 0
# 4643|           || detail > OWSMAN_SYSTEM_ERROR) {

Error: CPPCHECK_WARNING (CWE-457): [#def23]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:11552: error[legacyUninitvar]: Uninitialized variable: arg1
#11550|       }
#11551|     }
#11552|->   result = (char *)wsmc_transport_get_auth_name(arg1);
#11553|     resultobj = SWIG_FromCharPtr((const char *)result);
#11554|     return resultobj;

Error: CPPCHECK_WARNING (CWE-457): [#def24]
openwsman-2.8.1/build/bindings/python/openwsman_wrap.c:11606: error[legacyUninitvar]: Uninitialized variable: arg1
#11604|       }
#11605|     }
#11606|->   result = (char *)wsman_transport_get_last_error_string(arg1);
#11607|     resultobj = SWIG_FromCharPtr((const char *)result);
#11608|     return resultobj;

Error: COMPILER_WARNING (CWE-563): [#def25]
openwsman-2.8.1/include/wsman-soap.h:49: included_from: Included from here.
openwsman-2.8.1/examples/serialize.c:45: included_from: Included from here.
openwsman-2.8.1/examples/serialize.c: scope_hint: In function ‘example2’
openwsman-2.8.1/examples/serialize.c:225:23: warning[-Wunused-variable]: unused variable ‘Foo_TypeInfo’
#  225 |         SER_END_ITEMS(Foo);
#      |                       ^~~
openwsman-2.8.1/include/wsman-xml-serializer.h:631:19: note: in definition of macro ‘SER_END_ITEMS’
#  631 | XmlSerializerInfo t##_TypeInfo[] = {\
#      |                   ^
#  223|   	    SER_UINT32("FOOINT32", 1),
#  224|   	    SER_UINT8("FOOBYTE2", 1), 
#  225|-> 	SER_END_ITEMS(Foo);
#  226|   
#  227|   

Error: COMPILER_WARNING (CWE-563): [#def26]
openwsman-2.8.1/examples/serialize.c: scope_hint: In function ‘example4’
openwsman-2.8.1/examples/serialize.c:374:67: warning[-Wunused-variable]: unused variable ‘Embed_TypeInfo’
#  374 |             SER_STR("string", 1), SER_BOOL("b", 1), SER_END_ITEMS(Embed);
#      |                                                                   ^~~~~
openwsman-2.8.1/include/wsman-xml-serializer.h:631:19: note: in definition of macro ‘SER_END_ITEMS’
#  631 | XmlSerializerInfo t##_TypeInfo[] = {\
#      |                   ^
#  372|   	SER_START_ITEMS(Embed)
#  373|   	    SER_BOOL("a", 1),
#  374|-> 	    SER_STR("string", 1), SER_BOOL("b", 1), SER_END_ITEMS(Embed);
#  375|   
#  376|   	SER_START_ITEMS(Sample)

Error: COMPILER_WARNING (CWE-563): [#def27]
openwsman-2.8.1/examples/serialize.c: scope_hint: In function ‘example6’
openwsman-2.8.1/examples/serialize.c:575:27: warning[-Wunused-variable]: unused variable ‘Dummy_TypeInfo’
#  575 |             SER_END_ITEMS(Dummy);
#      |                           ^~~~~
openwsman-2.8.1/include/wsman-xml-serializer.h:631:19: note: in definition of macro ‘SER_END_ITEMS’
#  631 | XmlSerializerInfo t##_TypeInfo[] = {\
#      |                   ^
#  573|   	    SER_ATTR_NS_BOOL_FLAGS(NULL, "BOOL", 1, 0),
#  574|   	    SER_ATTR_NS_STR_FLAGS(NULL, "STRING", 1, 0),
#  575|-> 	    SER_END_ITEMS(Dummy);
#  576|   
#  577|   	SER_START_ITEMS(Sample)

Error: COMPILER_WARNING (CWE-563): [#def28]
openwsman-2.8.1/examples/serialize.c:691:58: warning[-Wunused-variable]: unused variable ‘SelectorSet_TypeInfo’
#  691 |                              string_attr), SER_END_ITEMS(SelectorSet);
#      |                                                          ^~~~~~~~~~~
openwsman-2.8.1/include/wsman-xml-serializer.h:631:19: note: in definition of macro ‘SER_END_ITEMS’
#  631 | XmlSerializerInfo t##_TypeInfo[] = {\
#      |                   ^
#  689|   	SER_START_ITEMS(SelectorSet)
#  690|   	    SER_NS_DYN_ARRAY(XML_NS_WS_MAN, WSM_SELECTOR, 0, 1000,
#  691|-> 			     string_attr), SER_END_ITEMS(SelectorSet);
#  692|   
#  693|   

Error: COMPILER_WARNING (CWE-563): [#def29]
openwsman-2.8.1/examples/serialize.c: scope_hint: In function ‘example7’
openwsman-2.8.1/examples/serialize.c:702:27: warning[-Wunused-variable]: unused variable ‘ReferenceParameters_TypeInfo’
#  702 |             SER_END_ITEMS(ReferenceParameters);
#      |                           ^~~~~~~~~~~~~~~~~~~
openwsman-2.8.1/include/wsman-xml-serializer.h:631:19: note: in definition of macro ‘SER_END_ITEMS’
#  631 | XmlSerializerInfo t##_TypeInfo[] = {\
#      |                   ^
#  700|   	    SER_NS_STR(XML_NS_WS_MAN, WSM_RESOURCE_URI, 1),
#  701|   	    SER_NS_STRUCT(XML_NS_WS_MAN, WSM_SELECTOR_SET, 1, SelectorSet),
#  702|-> 	    SER_END_ITEMS(ReferenceParameters);
#  703|   
#  704|   	typedef struct {

Error: COMPILER_WARNING (CWE-563): [#def30]
openwsman-2.8.1/examples/serialize.c: scope_hint: In function ‘example9’
openwsman-2.8.1/examples/serialize.c:861:23: warning[-Wunused-variable]: unused variable ‘empty_TypeInfo’
#  861 |         SER_END_ITEMS(empty);
#      |                       ^~~~~
openwsman-2.8.1/include/wsman-xml-serializer.h:631:19: note: in definition of macro ‘SER_END_ITEMS’
#  631 | XmlSerializerInfo t##_TypeInfo[] = {\
#      |                   ^
#  859|   	}empty;
#  860|   	SER_START_ITEMS(empty)
#  861|-> 	SER_END_ITEMS(empty);
#  862|   	char xmlstring[] = "<example></example>";
#  863|   	WsXmlDocH doc = ws_xml_read_memory(xmlstring, strlen(xmlstring), "UTF-8", 0);

Error: COMPILER_WARNING (CWE-563): [#def31]
openwsman-2.8.1/examples/serialize.c: scope_hint: In function ‘example11’
openwsman-2.8.1/examples/serialize.c:931:23: warning[-Wunused-variable]: unused variable ‘Foo_TypeInfo’
#  931 |         SER_END_ITEMS(Foo);
#      |                       ^~~
openwsman-2.8.1/include/wsman-xml-serializer.h:631:19: note: in definition of macro ‘SER_END_ITEMS’
#  631 | XmlSerializerInfo t##_TypeInfo[] = {\
#      |                   ^
#  929|   	    SER_INT32("FOOINT32", 1),
#  930|   	    SER_INT8("FOOBYTE2", 1), 
#  931|-> 	SER_END_ITEMS(Foo);
#  932|   
#  933|   

Error: COMPILER_WARNING (CWE-563): [#def32]
openwsman-2.8.1/examples/serialize.c:1024:24: warning[-Wunused-variable]: unused variable ‘myshorts’
# 1024 |         XML_TYPE_UINT8 myshorts[] = { 5, 11, 14};
#      |                        ^~~~~~~~
# 1022|   static void example13()
# 1023|   {
# 1024|-> 	XML_TYPE_UINT8 myshorts[] = { 5, 11, 14};
# 1025|   	typedef struct {
# 1026|   		XML_TYPE_UINT16 id;

Error: COMPILER_WARNING (CWE-563): [#def33]
openwsman-2.8.1/examples/serialize.c:1065:23: warning[-Wunused-variable]: unused variable ‘empty_TypeInfo’
# 1065 |         SER_END_ITEMS(empty);
#      |                       ^~~~~
openwsman-2.8.1/include/wsman-xml-serializer.h:631:19: note: in definition of macro ‘SER_END_ITEMS’
#  631 | XmlSerializerInfo t##_TypeInfo[] = {\
#      |                   ^
# 1063|   	}empty;
# 1064|   	SER_START_ITEMS(empty)
# 1065|-> 	SER_END_ITEMS(empty);
# 1066|   	typedef struct {
# 1067|   		XML_TYPE_INT16 num;

Error: COMPILER_WARNING (CWE-563): [#def34]
openwsman-2.8.1/examples/serialize.c: scope_hint: In function ‘example14’
openwsman-2.8.1/examples/serialize.c:1075:11: warning[-Wunused-variable]: unused variable ‘a1’
# 1075 |         A a1 = {-12, {}};
#      |           ^~
# 1073|   	SER_NS_STRUCT(NULL, "empty", 1, empty),
# 1074|   	SER_END_ITEMS(A);
# 1075|-> 	A a1 = {-12, {}};
# 1076|   	printf
# 1077|   	     ("\n\n ******* example 14. serialize/de-serialze with empty t_TypeItems *******\n");

Error: COMPILER_WARNING (CWE-563): [#def35]
openwsman-2.8.1/examples/serialize.c: scope_hint: In function ‘main’
openwsman-2.8.1/examples/serialize.c:1106:14: warning[-Wunused-but-set-variable]: variable ‘retval’ set but not used
# 1106 |         char retval = 0;
#      |              ^~~~~~
# 1104|   	int num;
# 1105|   	int i;
# 1106|-> 	char retval = 0;
# 1107|   	u_error_t *error = NULL;
# 1108|   	u_option_entry_t opt[] = {

Error: COMPILER_WARNING (CWE-563): [#def36]
openwsman-2.8.1/examples/serialize.c: scope_hint: In function ‘example13’
openwsman-2.8.1/include/wsman-xml-serializer.h:513:19: warning[-Wunused-variable]: unused variable ‘uint16_TypeInfo’
#  513 | XmlSerializerInfo uint16_TypeInfo[] = { \
#      |                   ^~~~~~~~~~~~~~~
openwsman-2.8.1/examples/serialize.c:1031:9: note: in expansion of macro ‘SER_TYPEINFO_UINT16’
# 1031 |         SER_TYPEINFO_UINT16;
#      |         ^~~~~~~~~~~~~~~~~~~
#  511|   }
#  512|   #define SER_TYPEINFO_UINT16 \
#  513|-> XmlSerializerInfo uint16_TypeInfo[] = { \
#  514|       SER_UINT16("uint16", 1), \
#  515|       SER_NULL \

Error: COMPILER_WARNING (CWE-563): [#def37]
openwsman-2.8.1/include/wsman-xml-serializer.h:518:19: warning[-Wunused-variable]: unused variable ‘int16_TypeInfo’
#  518 | XmlSerializerInfo int16_TypeInfo[] = { \
#      |                   ^~~~~~~~~~~~~~
openwsman-2.8.1/examples/serialize.c:1070:9: note: in expansion of macro ‘SER_TYPEINFO_INT16’
# 1070 |         SER_TYPEINFO_INT16;
#      |         ^~~~~~~~~~~~~~~~~~
#  516|   }
#  517|   #define SER_TYPEINFO_INT16 \
#  518|-> XmlSerializerInfo int16_TypeInfo[] = { \
#  519|       SER_INT16("int16", 1), \
#  520|       SER_NULL \

Error: GCC_ANALYZER_WARNING (CWE-775): [#def38]
openwsman-2.8.1/src/authenticators/file/file_auth.c:120:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
openwsman-2.8.1/src/authenticators/file/file_auth.c:104:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/authenticators/file/file_auth.c:109:22: branch_false: ...to here
openwsman-2.8.1/src/authenticators/file/file_auth.c:110:20: acquire_resource: opened here
openwsman-2.8.1/src/authenticators/file/file_auth.c:111:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openwsman-2.8.1/src/authenticators/file/file_auth.c:117:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/authenticators/file/file_auth.c:118:21: branch_true: ...to here
openwsman-2.8.1/src/authenticators/file/file_auth.c:120:17: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  118|                   if (sscanf(l, "%64[^:]:%128s", u, passwd) != 2)
#  119|                       continue;       /* Ignore malformed lines */
#  120|->                 debug( "user: %s,  passwd: XXXX", u);
#  121|                   min_len = strlen(u);
#  122|                   if (username_l < min_len) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
openwsman-2.8.1/src/authenticators/file/file_auth.c:120:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
openwsman-2.8.1/src/authenticators/file/file_auth.c:104:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/authenticators/file/file_auth.c:109:22: branch_false: ...to here
openwsman-2.8.1/src/authenticators/file/file_auth.c:110:20: acquire_memory: allocated here
openwsman-2.8.1/src/authenticators/file/file_auth.c:111:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openwsman-2.8.1/src/authenticators/file/file_auth.c:117:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/authenticators/file/file_auth.c:118:21: branch_true: ...to here
openwsman-2.8.1/src/authenticators/file/file_auth.c:120:17: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  118|                   if (sscanf(l, "%64[^:]:%128s", u, passwd) != 2)
#  119|                       continue;       /* Ignore malformed lines */
#  120|->                 debug( "user: %s,  passwd: XXXX", u);
#  121|                   min_len = strlen(u);
#  122|                   if (username_l < min_len) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def40]
openwsman-2.8.1/src/authenticators/file/file_auth.c:133:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
openwsman-2.8.1/src/authenticators/file/file_auth.c:104:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/authenticators/file/file_auth.c:109:22: branch_false: ...to here
openwsman-2.8.1/src/authenticators/file/file_auth.c:110:20: acquire_resource: opened here
openwsman-2.8.1/src/authenticators/file/file_auth.c:111:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openwsman-2.8.1/src/authenticators/file/file_auth.c:117:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/authenticators/file/file_auth.c:118:21: branch_true: ...to here
openwsman-2.8.1/src/authenticators/file/file_auth.c:133:25: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  131|                             min_len = newpw_l;
#  132|                           }
#  133|->                         debug( "user: %s,  passwd: XXXXX", u );
#  134|                           authorized = ( safe_cmp ((unsigned char *)newpw, (unsigned char *)passwd, min_len) == 0 );
#  135|                       break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
openwsman-2.8.1/src/authenticators/file/file_auth.c:133:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
openwsman-2.8.1/src/authenticators/file/file_auth.c:104:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/authenticators/file/file_auth.c:109:22: branch_false: ...to here
openwsman-2.8.1/src/authenticators/file/file_auth.c:110:20: acquire_memory: allocated here
openwsman-2.8.1/src/authenticators/file/file_auth.c:111:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openwsman-2.8.1/src/authenticators/file/file_auth.c:117:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/authenticators/file/file_auth.c:118:21: branch_true: ...to here
openwsman-2.8.1/src/authenticators/file/file_auth.c:133:25: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  131|                             min_len = newpw_l;
#  132|                           }
#  133|->                         debug( "user: %s,  passwd: XXXXX", u );
#  134|                           authorized = ( safe_cmp ((unsigned char *)newpw, (unsigned char *)passwd, min_len) == 0 );
#  135|                       break;

Error: CPPCHECK_WARNING (CWE-476): [#def42]
openwsman-2.8.1/src/lib/test/test_string.c:51: warning[nullPointer]: Possible null pointer dereference: query
#   49|               }
#   50|           }
#   51|->         (void) console("%s", query);
#   52|   
#   53|           hash_t *h = u_parse_query(query);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def43]
openwsman-2.8.1/src/lib/u/base64.c:155:39: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘b[1]’
openwsman-2.8.1/src/lib/u/base64.c:134:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/u/base64.c:139:14: branch_false: ...to here
openwsman-2.8.1/src/lib/u/base64.c:139:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openwsman-2.8.1/src/lib/u/base64.c:143:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
openwsman-2.8.1/src/lib/u/base64.c:146:29: branch_true: following ‘true’ branch (when ‘i != 4’)...
openwsman-2.8.1/src/lib/u/base64.c:147:30: branch_true: ...to here
openwsman-2.8.1/src/lib/u/base64.c:148:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/u/base64.c:152:25: branch_false: ...to here
openwsman-2.8.1/src/lib/u/base64.c:146:29: branch_false: following ‘false’ branch (when ‘i == 4’)...
openwsman-2.8.1/src/lib/u/base64.c:155:25: branch_false: ...to here
openwsman-2.8.1/src/lib/u/base64.c:155:39: danger: use of uninitialized value ‘b[1]’ here
#  153|   			b[i] = DTable[(unsigned int)c];
#  154|   		}
#  155|-> 		o[0] = (b[0] << 2) | (b[1] >> 4);
#  156|   		o[1] = (b[1] << 4) | (b[2] >> 2);
#  157|   		o[2] = (b[2] << 6) | b[3];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def44]
openwsman-2.8.1/src/lib/u/debug.c:67:52: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘n’
openwsman-2.8.1/src/lib/u/debug.c:52:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/u/debug.c:54:13: branch_false: ...to here
openwsman-2.8.1/src/lib/u/debug.c:65:12: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/u/debug.c:66:30: branch_true: ...to here
openwsman-2.8.1/src/lib/u/debug.c:66:30: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/u/debug.c:67:52: branch_false: ...to here
openwsman-2.8.1/src/lib/u/debug.c:67:52: danger: dereference of NULL ‘n’
#   65|   	if (list_count(handlers) > 0) {
#   66|   		lnode_t *n = list_last(handlers);
#   67|-> 		handler->id = ((debug_handler_t *) n->list_data)->id + 1;
#   68|   	} else
#   69|   		handler->id = 1;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def45]
openwsman-2.8.1/src/lib/u/debug.c:130:15: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openwsman-2.8.1/src/lib/u/debug.c:125:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/u/debug.c:129:9: branch_false: ...to here
openwsman-2.8.1/src/lib/u/debug.c:129:9: acquire_resource: ‘va_start’ called here
openwsman-2.8.1/src/lib/u/debug.c:130:15: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  128|   
#  129|   	va_start(args, format);
#  130|-> 	str = u_strdup_vprintf(format, args);
#  131|   	va_end(args);
#  132|   	if (str == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-404): [#def46]
openwsman-2.8.1/src/lib/u/debug.c:160:16: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openwsman-2.8.1/src/lib/u/debug.c:155:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/u/debug.c:159:9: branch_false: ...to here
openwsman-2.8.1/src/lib/u/debug.c:159:9: acquire_resource: ‘va_start’ called here
openwsman-2.8.1/src/lib/u/debug.c:160:16: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  158|   
#  159|   	va_start(args, format);
#  160|-> 	body = u_strdup_vprintf(format, args);
#  161|   	va_end(args);
#  162|   	if (body == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def47]
openwsman-2.8.1/src/lib/u/hash.c:243:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘low_tail’
openwsman-2.8.1/src/lib/u/hash.c:659:10: enter_function: entry to ‘ow_hash_delete’
openwsman-2.8.1/src/lib/u/hash.c:664:5: call_function: calling ‘ow_hash_lookup’ from ‘ow_hash_delete’
openwsman-2.8.1/src/lib/u/hash.c:664:5: return_function: returning to ‘ow_hash_delete’ from ‘ow_hash_lookup’
openwsman-2.8.1/src/lib/u/hash.c:664:5: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/u/hash.c:665:5: branch_true: ...to here
openwsman-2.8.1/src/lib/u/hash.c:665:5: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/u/hash.c:667:9: branch_true: ...to here
openwsman-2.8.1/src/lib/u/hash.c:667:8: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/u/hash.c:667:9: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/u/hash.c:669:9: branch_true: ...to here
openwsman-2.8.1/src/lib/u/hash.c:669:9: call_function: calling ‘shrink_table’ from ‘ow_hash_delete’
#  241|   	    ;	/* 3 */
#  242|   	if (low_chain != 0)				/* 4 */
#  243|-> 	    low_tail->next = high_chain;
#  244|   	else if (high_chain != 0)			/* 5 */
#  245|   	    hash->table[chain] = high_chain;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def48]
openwsman-2.8.1/src/lib/u/iniparser.c:186:11: warning[-Wanalyzer-null-argument]: use of NULL ‘key’ where non-null expected
openwsman-2.8.1/src/lib/u/iniparser.c:707:8: enter_function: entry to ‘iniparser_getstring’
openwsman-2.8.1/src/lib/u/iniparser.c:713:12: call_function: calling ‘strlwc’ from ‘iniparser_getstring’
openwsman-2.8.1/src/lib/u/iniparser.c:713:12: return_function: returning to ‘iniparser_getstring’ from ‘strlwc’
openwsman-2.8.1/src/lib/u/iniparser.c:713:12: call_function: calling ‘dictionary_get’ from ‘iniparser_getstring’
#argument 1 of ‘__builtin_strlen’ must be non-null
#  184|       int         i ;
#  185|   
#  186|->     len = strlen(key);
#  187|       for (hash=0, i=0 ; i<len ; i++) {
#  188|           hash += (unsigned)key[i] ;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def49]
openwsman-2.8.1/src/lib/u/iniparser.c:506:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
openwsman-2.8.1/src/lib/u/iniparser.c:897:14: enter_function: entry to ‘iniparser_new’
openwsman-2.8.1/src/lib/u/iniparser.c:907:8: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/u/iniparser.c:911:5: branch_false: ...to here
openwsman-2.8.1/src/lib/u/iniparser.c:916:9: call_function: calling ‘dictionary_new’ from ‘iniparser_new’
openwsman-2.8.1/src/lib/u/iniparser.c:916:9: return_function: returning to ‘iniparser_new’ from ‘dictionary_new’
openwsman-2.8.1/src/lib/u/iniparser.c:917:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
openwsman-2.8.1/src/lib/u/iniparser.c:921:12: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/u/iniparser.c:922:17: branch_true: ...to here
openwsman-2.8.1/src/lib/u/iniparser.c:922:17: call_function: calling ‘strskp’ from ‘iniparser_new’
openwsman-2.8.1/src/lib/u/iniparser.c:922:17: return_function: returning to ‘iniparser_new’ from ‘strskp’
openwsman-2.8.1/src/lib/u/iniparser.c:928:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/u/iniparser.c:930:30: branch_true: ...to here
openwsman-2.8.1/src/lib/u/iniparser.c:930:30: call_function: calling ‘strlwc’ from ‘iniparser_new’
openwsman-2.8.1/src/lib/u/iniparser.c:930:30: return_function: returning to ‘iniparser_new’ from ‘strlwc’
openwsman-2.8.1/src/lib/u/iniparser.c:932:21: call_function: calling ‘iniparser_add_entry’ from ‘iniparser_new’
#  504|           snprintf(longkey, sizeof(longkey), "%s:%s", sec, key);
#  505|       } else {
#  506|->         strncpy(longkey, sec, sizeof(longkey));
#  507|       }
#  508|       longkey[sizeof(longkey)-1] = 0;

Error: GCC_ANALYZER_WARNING (CWE-674): [#def50]
openwsman-2.8.1/src/lib/u/list.c:395:9: warning[-Wanalyzer-infinite-recursion]: infinite recursion
openwsman-2.8.1/src/lib/u/list.c:376:6: enter_function: initial entry to ‘ow_list_sort’
openwsman-2.8.1/src/lib/u/list.c:382:8: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/u/list.c:383:9: branch_true: ...to here
openwsman-2.8.1/src/lib/u/list.c:386:9: call_function: inlined call to ‘ow_list_init’ from ‘ow_list_sort’
openwsman-2.8.1/src/lib/u/list.c:393:9: call_function: calling ‘ow_list_transfer’ from ‘ow_list_sort’
openwsman-2.8.1/src/lib/u/list.c:393:9: return_function: returning to ‘ow_list_sort’ from ‘ow_list_transfer’
openwsman-2.8.1/src/lib/u/list.c:395:9: call_function: calling ‘ow_list_sort’ from ‘ow_list_sort’
#  393|   	ow_list_transfer(&extra, list, node);
#  394|   	/* sort 'left' half */
#  395|-> 	ow_list_sort(list, compare);
#  396|   	/* sort 'right' half */
#  397|   	ow_list_sort(&extra, compare);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def51]
openwsman-2.8.1/src/lib/u/log.c:86:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openwsman-2.8.1/src/lib/u/log.c:74:5: acquire_resource: ‘va_start’ called here
openwsman-2.8.1/src/lib/u/log.c:76:7: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/u/log.c:86:9: branch_false: ...to here
openwsman-2.8.1/src/lib/u/log.c:86:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   84|           hook(hook_arg, level, buf);
#   85|       } else
#   86|->         vsyslog(fac | level, fmt, ap);
#   87|   
#   88|       va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def52]
openwsman-2.8.1/src/lib/u/uerr.c:53:29: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openwsman-2.8.1/src/lib/u/uerr.c:43:12: branch_false: following ‘false’ branch (when ‘error’ is non-NULL)...
openwsman-2.8.1/src/lib/u/uerr.c:46:18: branch_false: ...to here
openwsman-2.8.1/src/lib/u/uerr.c:47:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/u/uerr.c:51:9: branch_false: ...to here
openwsman-2.8.1/src/lib/u/uerr.c:52:9: acquire_resource: ‘va_start’ called here
openwsman-2.8.1/src/lib/u/uerr.c:53:29: danger: missing call to ‘va_end’ to match ‘va_start’ at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   51|   	(*error)->code = code;
#   52|   	va_start(args, format);
#   53|-> 	(*error)->message = u_strdup_vprintf(format, args);
#   54|   	va_end(args);
#   55|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def53]
openwsman-2.8.1/src/lib/u/uoption.c:72:22: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openwsman-2.8.1/src/lib/u/uoption.c:665:6: enter_function: entry to ‘u_option_context_parse’
openwsman-2.8.1/src/lib/u/uoption.c:683:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
openwsman-2.8.1/src/lib/u/uoption.c:686:46: branch_false: ...to here
openwsman-2.8.1/src/lib/u/uoption.c:688:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/u/uoption.c:692:18: branch_false: ...to here
openwsman-2.8.1/src/lib/u/uoption.c:698:12: branch_false: following ‘false’ branch (when ‘argptr’ is NULL)...
openwsman-2.8.1/src/lib/u/uoption.c:701:34: branch_false: ...to here
openwsman-2.8.1/src/lib/u/uoption.c:703:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openwsman-2.8.1/src/lib/u/uoption.c:716:41: call_function: calling ‘context_get_number_entries’ from ‘u_option_context_parse’
openwsman-2.8.1/src/lib/u/uoption.c:716:41: return_function: returning to ‘u_option_context_parse’ from ‘context_get_number_entries’
openwsman-2.8.1/src/lib/u/uoption.c:717:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openwsman-2.8.1/src/lib/u/uoption.c:722:20: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/u/uoption.c:723:27: branch_true: ...to here
openwsman-2.8.1/src/lib/u/uoption.c:723:20: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/u/uoption.c:730:20: branch_false: ...to here
openwsman-2.8.1/src/lib/u/uoption.c:730:20: branch_false: following ‘false’ branch (when ‘next_shopt == 0’)...
openwsman-2.8.1/src/lib/u/uoption.c:735:25: branch_false: ...to here
openwsman-2.8.1/src/lib/u/uoption.c:755:33: call_function: calling ‘find_short_opt’ from ‘u_option_context_parse’
#   70|   	buf->part2 = NULL;
#   71|   	va_start(ap, format);
#   72|-> 	buf->part1 = u_strdup_vprintf(format, ap);
#   73|   	if (!buf->part1) {
#   74|   		va_end(ap);

Error: COMPILER_WARNING (CWE-1164): [#def54]
openwsman-2.8.1/src/lib/wsman-curl-client-transport.c:269:1: warning[-Wunused-function]: ‘sslctxfun’ defined but not used
#  269 | sslctxfun(CURL *curl, void *sslctx, void *parm)
#      | ^~~~~~~~~
#  267|   
#  268|   static CURLcode
#  269|-> sslctxfun(CURL *curl, void *sslctx, void *parm)
#  270|   {
#  271|   	CURLcode r = CURLE_OK;

Error: COMPILER_WARNING (CWE-9001): [#def55]
openwsman-2.8.1/src/lib/wsman-curl-client-transport.c:302:15: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  302 |           r = curl_easy_setopt(curl, CURLOPT_NOSIGNAL, nosignal);
#      |               ^~~~~~~~~~~~~~~~
#  300|           if (ini) {
#  301|             int nosignal = iniparser_getint(ini, "client:curlopt_nosignal", 0);
#  302|->           r = curl_easy_setopt(curl, CURLOPT_NOSIGNAL, nosignal);
#  303|             if (r != 0) {
#  304|               curl_err("curl_easy_setopt(CURLOPT_NOSIGNAL) failed");

Error: COMPILER_WARNING (CWE-9001): [#def56]
openwsman-2.8.1/src/lib/wsman-curl-client-transport.c:302:15: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  300|           if (ini) {
#  301|             int nosignal = iniparser_getint(ini, "client:curlopt_nosignal", 0);
#  302|->           r = curl_easy_setopt(curl, CURLOPT_NOSIGNAL, nosignal);
#  303|             if (r != 0) {
#  304|               curl_err("curl_easy_setopt(CURLOPT_NOSIGNAL) failed");

Error: COMPILER_WARNING (CWE-9001): [#def57]
openwsman-2.8.1/src/lib/wsman-curl-client-transport.c:310:13: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  310 |         r = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, wsman_transport_get_verify_peer(cl)?1:0);
#      |             ^~~~~~~~~~~~~~~~
#  308|   	debug("cl->authentication.verify_peer: %d", cl->authentication.verify_peer );
#  309|   	// verify peer
#  310|-> 	r = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, wsman_transport_get_verify_peer(cl)?1:0);
#  311|   	if (r != 0) {
#  312|   		curl_err("curl_easy_setopt(CURLOPT_SSL_VERIFYPEER) failed");

Error: COMPILER_WARNING (CWE-9001): [#def58]
openwsman-2.8.1/src/lib/wsman-curl-client-transport.c:310:13: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  308|   	debug("cl->authentication.verify_peer: %d", cl->authentication.verify_peer );
#  309|   	// verify peer
#  310|-> 	r = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, wsman_transport_get_verify_peer(cl)?1:0);
#  311|   	if (r != 0) {
#  312|   		curl_err("curl_easy_setopt(CURLOPT_SSL_VERIFYPEER) failed");

Error: COMPILER_WARNING (CWE-9001): [#def59]
openwsman-2.8.1/src/lib/wsman-curl-client-transport.c:317:13: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  317 |         r = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, wsman_transport_get_verify_host(cl)?2:0);
#      |             ^~~~~~~~~~~~~~~~
#  315|   
#  316|   	// verify host
#  317|-> 	r = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, wsman_transport_get_verify_host(cl)?2:0);
#  318|   	if (r != 0) {
#  319|   		curl_err("curl_easy_setopt(CURLOPT_SSL_VERIFYHOST) failed");

Error: COMPILER_WARNING (CWE-9001): [#def60]
openwsman-2.8.1/src/lib/wsman-curl-client-transport.c:317:13: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  315|   
#  316|   	// verify host
#  317|-> 	r = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, wsman_transport_get_verify_host(cl)?2:0);
#  318|   	if (r != 0) {
#  319|   		curl_err("curl_easy_setopt(CURLOPT_SSL_VERIFYHOST) failed");

Error: COMPILER_WARNING (CWE-9001): [#def61]
openwsman-2.8.1/src/lib/wsman-curl-client-transport.c: scope_hint: In function ‘wsmc_handler’
openwsman-2.8.1/src/lib/wsman-curl-client-transport.c:554:13: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  554 |         r = curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, len);
#      |             ^
#  552|   		goto DONE;
#  553|   	}
#  554|-> 	r = curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, len);
#  555|   	if (r != CURLE_OK) {
#  556|   		cl->fault_string = u_strdup(curl_easy_strerror(r));

Error: COMPILER_WARNING (CWE-9001): [#def62]
openwsman-2.8.1/src/lib/wsman-curl-client-transport.c:597:25: warning[-Wattribute-warning]: call to ‘Wcurl_easy_setopt_err_long’ declared with attribute warning: curl_easy_setopt expects a long argument
#  597 |                         curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
#      |                         ^
#  595|   
#  596|   		if (wsman_debug_level_debugged(DEBUG_LEVEL_MESSAGE)) {
#  597|-> 			curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
#  598|   		}
#  599|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def63]
openwsman-2.8.1/src/lib/wsman-libxml2-binding.c:106:18: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openwsman-2.8.1/src/lib/wsman-libxml2-binding.c:105:9: acquire_resource: ‘va_start’ called here
openwsman-2.8.1/src/lib/wsman-libxml2-binding.c:106:18: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  104|   	char *string = NULL;
#  105|   	va_start(args, msg);
#  106|-> 	string = u_strdup_vprintf (msg, args);
#  107|   	if (string)
#  108|   		_warning (string);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def64]
openwsman-2.8.1/src/lib/wsman-server.c:204:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’
openwsman-2.8.1/src/lib/wsman-server.c:197:11: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-server.c:198:24: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-server.c:202:11: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/wsman-server.c:203:33: branch_true: ...to here
openwsman-2.8.1/src/lib/wsman-server.c:203:33: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-server.c:204:34: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-server.c:204:34: danger: dereference of NULL ‘node’
#  202|   	if(list_count(cntx->subscriptionMemList) > subsNum) {
#  203|   		lnode_t *node = list_last(cntx->subscriptionMemList);
#  204|-> 		WsSubscribeInfo *subs = (WsSubscribeInfo *)node->list_data;
#  205|   		//Update UUID in the memory
#  206|   		strncpy(subs->subsId, entry->uuid+5, EUIDLEN);

Error: COMPILER_WARNING: [#def65]
openwsman-2.8.1/src/lib/wsman-server.c: scope_hint: In function ‘wsman_repos_notification_dispatcher’
openwsman-2.8.1/src/lib/wsman-server.c:206:17: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 64 equals destination size
#  206 |                 strncpy(subs->subsId, entry->uuid+5, EUIDLEN);
#      |                 ^
#  204|   		WsSubscribeInfo *subs = (WsSubscribeInfo *)node->list_data;
#  205|   		//Update UUID in the memory
#  206|-> 		strncpy(subs->subsId, entry->uuid+5, EUIDLEN);
#  207|   	}
#  208|   }

Error: COMPILER_WARNING: [#def66]
openwsman-2.8.1/src/lib/wsman-soap.c: scope_hint: In function ‘wse_subscribe_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:1812:17: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 64 equals destination size
# 1812 |                 strncpy(subsInfo->subsId, ntext, EUIDLEN);
#      |                 ^
# 1810|   	ntext = ws_xml_get_node_text(temp);
# 1811|   	if(temp && ntext) { //it is a request from the saved request. So we recover the former UUID
# 1812|-> 		strncpy(subsInfo->subsId, ntext, EUIDLEN);
# 1813|   		debug("Recover to uuid:%s",subsInfo->subsId);
# 1814|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def67]
openwsman-2.8.1/src/lib/wsman-soap.c:1991:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘t’
openwsman-2.8.1/src/lib/wsman-soap.c:1954:1: enter_function: entry to ‘wse_unsubscribe_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:1962:32: call_function: calling ‘soap_get_op_soap’ from ‘wse_unsubscribe_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:1962:32: return_function: returning to ‘wse_unsubscribe_stub’ from ‘soap_get_op_soap’
openwsman-2.8.1/src/lib/wsman-soap.c:1964:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-soap.c:1969:31: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-soap.c:1974:32: call_function: calling ‘soap_get_op_doc’ from ‘wse_unsubscribe_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:1974:32: return_function: returning to ‘wse_unsubscribe_stub’ from ‘soap_get_op_doc’
openwsman-2.8.1/src/lib/wsman-soap.c:1977:18: call_function: calling ‘ws_create_ep_context’ from ‘wse_unsubscribe_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:1977:18: return_function: returning to ‘wse_unsubscribe_stub’ from ‘ws_create_ep_context’
openwsman-2.8.1/src/lib/wsman-soap.c:1981:11: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-soap.c:1986:22: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-soap.c:1989:11: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/wsman-soap.c:1990:21: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-soap.c:1991:17: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-soap.c:1991:17: danger: dereference of NULL ‘t’
# 1989|   	if(!list_isempty(soapCntx->subscriptionMemList)) {
# 1990|   		t = list_first(soapCntx->subscriptionMemList);
# 1991|-> 		subsInfo = (WsSubscribeInfo *)t->list_data;
# 1992|   		while(t && strcasecmp(subsInfo->subsId, uuid+5)) {
# 1993|   			t = list_next(soapCntx->subscriptionMemList, t);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def68]
openwsman-2.8.1/src/lib/wsman-soap.c:2023:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ws_create_ep_context(soap_get_op_soap(op), soap_get_op_doc(op, 1))’
openwsman-2.8.1/src/lib/wsman-soap.c:1954:1: enter_function: entry to ‘wse_unsubscribe_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:1962:32: call_function: calling ‘soap_get_op_soap’ from ‘wse_unsubscribe_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:1962:32: return_function: returning to ‘wse_unsubscribe_stub’ from ‘soap_get_op_soap’
openwsman-2.8.1/src/lib/wsman-soap.c:1964:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-soap.c:1969:31: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-soap.c:1974:32: call_function: calling ‘soap_get_op_doc’ from ‘wse_unsubscribe_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:1974:32: return_function: returning to ‘wse_unsubscribe_stub’ from ‘soap_get_op_doc’
openwsman-2.8.1/src/lib/wsman-soap.c:1977:18: call_function: calling ‘ws_create_ep_context’ from ‘wse_unsubscribe_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:1977:18: return_function: returning to ‘wse_unsubscribe_stub’ from ‘ws_create_ep_context’
openwsman-2.8.1/src/lib/wsman-soap.c:1978:9: call_function: calling ‘wsman_status_init’ from ‘wse_unsubscribe_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:1978:9: return_function: returning to ‘wse_unsubscribe_stub’ from ‘wsman_status_init’
openwsman-2.8.1/src/lib/wsman-soap.c:2023:9: danger: dereference of NULL ‘ws_create_ep_context(soap_get_op_soap(op), soap_get_op_doc(op, 1))’
# 2021|   		soap_set_op_doc(op, doc, 0);
# 2022|   	}
# 2023|-> 	ws_serializer_free_all(epcntx->serializercntx);
# 2024|   	ws_destroy_context(epcntx);
# 2025|   	u_free(status.fault_msg);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def69]
openwsman-2.8.1/src/lib/wsman-soap.c:2078:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘t’
openwsman-2.8.1/src/lib/wsman-soap.c:2037:1: enter_function: entry to ‘wse_renew_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:2046:32: call_function: calling ‘soap_get_op_soap’ from ‘wse_renew_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:2046:32: return_function: returning to ‘wse_renew_stub’ from ‘soap_get_op_soap’
openwsman-2.8.1/src/lib/wsman-soap.c:2048:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-soap.c:2053:31: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-soap.c:2060:32: call_function: calling ‘soap_get_op_doc’ from ‘wse_renew_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:2060:32: return_function: returning to ‘wse_renew_stub’ from ‘soap_get_op_doc’
openwsman-2.8.1/src/lib/wsman-soap.c:2062:18: call_function: calling ‘ws_create_ep_context’ from ‘wse_renew_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:2062:18: return_function: returning to ‘wse_renew_stub’ from ‘ws_create_ep_context’
openwsman-2.8.1/src/lib/wsman-soap.c:2068:11: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-soap.c:2074:9: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-soap.c:2076:11: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/wsman-soap.c:2077:21: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-soap.c:2078:17: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-soap.c:2078:17: danger: dereference of NULL ‘t’
# 2076|   	if(!list_isempty(soapCntx->subscriptionMemList)) {
# 2077|   		t = list_first(soapCntx->subscriptionMemList);
# 2078|-> 		subsInfo = (WsSubscribeInfo *)t->list_data;
# 2079|   		while(t && strcasecmp(subsInfo->subsId, uuid+5)) {
# 2080|   			t = list_next(soapCntx->subscriptionMemList, t);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def70]
openwsman-2.8.1/src/lib/wsman-soap.c:2127:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ws_create_ep_context(soap_get_op_soap(op), soap_get_op_doc(op, 1))’
openwsman-2.8.1/src/lib/wsman-soap.c:2037:1: enter_function: entry to ‘wse_renew_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:2046:32: call_function: calling ‘soap_get_op_soap’ from ‘wse_renew_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:2046:32: return_function: returning to ‘wse_renew_stub’ from ‘soap_get_op_soap’
openwsman-2.8.1/src/lib/wsman-soap.c:2048:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-soap.c:2053:31: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-soap.c:2060:32: call_function: calling ‘soap_get_op_doc’ from ‘wse_renew_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:2060:32: return_function: returning to ‘wse_renew_stub’ from ‘soap_get_op_doc’
openwsman-2.8.1/src/lib/wsman-soap.c:2062:18: call_function: calling ‘ws_create_ep_context’ from ‘wse_renew_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:2062:18: return_function: returning to ‘wse_renew_stub’ from ‘ws_create_ep_context’
openwsman-2.8.1/src/lib/wsman-soap.c:2063:9: call_function: calling ‘wsman_status_init’ from ‘wse_renew_stub’
openwsman-2.8.1/src/lib/wsman-soap.c:2063:9: return_function: returning to ‘wse_renew_stub’ from ‘wsman_status_init’
openwsman-2.8.1/src/lib/wsman-soap.c:2127:9: danger: dereference of NULL ‘ws_create_ep_context(soap_get_op_soap(op), soap_get_op_doc(op, 1))’
# 2125|   		soap_set_op_doc(op, doc, 0);
# 2126|   	}
# 2127|-> 	ws_serializer_free_all(epcntx->serializercntx);
# 2128|   	ws_destroy_context(epcntx);
# 2129|   	u_free(status.fault_msg);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:111:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:102:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:104:21: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:105:14: acquire_resource: opened here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:106:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:111:9: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:111:9: danger: ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  109|             return -1;
#  110|           }
#  111|-> 	u_free(subs_path);
#  112|   	while (!feof(fp)) {
#  113|             memset(block, 0, 512);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:111:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:102:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:104:21: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:105:14: acquire_memory: allocated here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:106:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:111:9: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:111:9: danger: ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  109|             return -1;
#  110|           }
#  111|-> 	u_free(subs_path);
#  112|   	while (!feof(fp)) {
#  113|             memset(block, 0, 512);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def73]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:116:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:102:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:104:21: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:105:14: acquire_resource: opened here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:106:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:111:9: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:112:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:113:11: branch_true: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:116:13: danger: ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  114|             m = fread(block, 1, 511, fp);
#  115|             if (m > 0) {
#  116|->             debug("read [%s] from file, len = %d",block, m);
#  117|               pre_count = count;
#  118|               count += m;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def74]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:116:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:102:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:104:21: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:105:14: acquire_memory: allocated here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:106:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:111:9: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:112:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:113:11: branch_true: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:116:13: danger: ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  114|             m = fread(block, 1, 511, fp);
#  115|             if (m > 0) {
#  116|->             debug("read [%s] from file, len = %d",block, m);
#  117|               pre_count = count;
#  118|               count += m;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def75]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:119:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:102:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:104:21: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:105:14: acquire_resource: opened here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:106:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:111:9: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:112:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:113:11: branch_true: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:119:13: danger: ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  117|               pre_count = count;
#  118|               count += m;
#  119|->             debug("buf = %0x, count = %d", buf, count);
#  120|               unsigned char *temp = u_realloc(buf, count);
#  121|               if (!temp) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:119:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:102:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:104:21: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:105:14: acquire_memory: allocated here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:106:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:111:9: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:112:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:113:11: branch_true: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:119:13: danger: ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  117|               pre_count = count;
#  118|               count += m;
#  119|->             debug("buf = %0x, count = %d", buf, count);
#  120|               unsigned char *temp = u_realloc(buf, count);
#  121|               if (!temp) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def77]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:120:35: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:102:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:104:21: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:105:14: acquire_resource: opened here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:106:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:111:9: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:112:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:113:11: branch_true: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:120:35: danger: ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  118|               count += m;
#  119|               debug("buf = %0x, count = %d", buf, count);
#  120|->             unsigned char *temp = u_realloc(buf, count);
#  121|               if (!temp) {
#  122|                 free(buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:120:35: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:102:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:104:21: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:105:14: acquire_memory: allocated here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:106:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:111:9: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:112:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:113:11: branch_true: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:120:35: danger: ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  118|               count += m;
#  119|               debug("buf = %0x, count = %d", buf, count);
#  120|->             unsigned char *temp = u_realloc(buf, count);
#  121|               if (!temp) {
#  122|                 free(buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def79]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:149:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:140:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:142:21: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:143:14: acquire_resource: opened here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:144:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:149:9: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:149:9: danger: ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  147|             return -1;
#  148|           }
#  149|-> 	u_free(subs_path);
#  150|   	fclose(fp);
#  151|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:149:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:140:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:142:21: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:143:14: acquire_memory: allocated here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:144:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:149:9: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:149:9: danger: ‘fopen(u_strdup_printf("%s/uuid:%s", uri_repository,  uuid), "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  147|             return -1;
#  148|           }
#  149|-> 	u_free(subs_path);
#  150|   	fclose(fp);
#  151|   	return 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def81]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:186:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(u_strdup_printf("%s/%s", uri_repository, &**_5.d_name), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:162:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:164:12: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:164:12: branch_false: following ‘false’ branch (when ‘subscription_list’ is non-NULL)...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:166:22: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:166:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:170:24: branch_true: following ‘true’ branch (when ‘n != 0’)...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:175:44: branch_true: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:175:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:180:32: acquire_resource: opened here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:181:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:186:25: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:186:25: danger: ‘fopen(u_strdup_printf("%s/%s", uri_repository, &**_5.d_name), "r")’ leaks here; was opened at [(12)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/11)
#  184|                             return -1;
#  185|                           }
#  186|-> 			u_free(subs_path);
#  187|   			count = 0;
#  188|   			buf = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:186:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(u_strdup_printf("%s/%s", uri_repository, &**_5.d_name), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:162:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:164:12: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:164:12: branch_false: following ‘false’ branch (when ‘subscription_list’ is non-NULL)...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:166:22: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:166:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:170:24: branch_true: following ‘true’ branch (when ‘n != 0’)...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:175:44: branch_true: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:175:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:180:32: acquire_memory: allocated here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:181:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:186:25: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:186:25: danger: ‘fopen(u_strdup_printf("%s/%s", uri_repository, &**_5.d_name), "r")’ leaks here; was allocated at [(12)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/11)
#  184|                             return -1;
#  185|                           }
#  186|-> 			u_free(subs_path);
#  187|   			count = 0;
#  188|   			buf = NULL;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def83]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:195:63: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(u_strdup_printf("%s/%s", uri_repository, &**_5.d_name), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:162:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:164:12: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:164:12: branch_false: following ‘false’ branch (when ‘subscription_list’ is non-NULL)...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:166:22: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:166:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:170:24: branch_true: following ‘true’ branch (when ‘n != 0’)...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:175:44: branch_true: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:175:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:180:32: acquire_resource: opened here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:181:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:186:25: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:189:32: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:190:33: branch_true: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:195:63: danger: ‘fopen(u_strdup_printf("%s/%s", uri_repository, &**_5.d_name), "r")’ leaks here; was opened at [(12)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/11)
#  193|   					pre_count = count;
#  194|   					count += m;
#  195|-> 					unsigned char *temp = u_realloc(buf, count);
#  196|   					if (!temp) {
#  197|   						free(buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:195:63: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(u_strdup_printf("%s/%s", uri_repository, &**_5.d_name), "r")’
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:162:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:164:12: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:164:12: branch_false: following ‘false’ branch (when ‘subscription_list’ is non-NULL)...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:166:22: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:166:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:170:24: branch_true: following ‘true’ branch (when ‘n != 0’)...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:175:44: branch_true: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:175:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:180:32: acquire_memory: allocated here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:181:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:186:25: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:189:32: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:190:33: branch_true: ...to here
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:195:63: danger: ‘fopen(u_strdup_printf("%s/%s", uri_repository, &**_5.d_name), "r")’ leaks here; was allocated at [(12)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/11)
#  193|   					pre_count = count;
#  194|   					count += m;
#  195|-> 					unsigned char *temp = u_realloc(buf, count);
#  196|   					if (!temp) {
#  197|   						free(buf);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def85]
openwsman-2.8.1/src/plugins/cim/cim_data_stubs.c:566:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘enumInfo’
openwsman-2.8.1/src/plugins/cim/cim_data_stubs.c:522:12: branch_true: following ‘true’ branch (when ‘enumInfo’ is NULL)...
openwsman-2.8.1/src/plugins/cim/cim_data_stubs.c:523:17: branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/cim_data_stubs.c:566:14: danger: dereference of NULL ‘enumInfo’
#  564|   
#  565|   cleanup:
#  566|-> 	if ( enumInfo->totalItems == 0 ||
#  567|   		( enumInfo->index + 1 ) == enumInfo->totalItems) {
#  568|   		cim_release_enum_context(enumInfo);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def86]
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:601:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argnode’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1784:1: enter_function: entry to ‘cim_invoke_method’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1801:20: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1802:25: branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1802:25: call_function: inlined call to ‘cim_add_keys’ from ‘cim_invoke_method’
 branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1805:12: branch_true: following ‘true’ branch (when ‘objectpath’ is non-NULL)...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1809:17: branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1815:20: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1817:34: call_function: calling ‘cim_add_args’ from ‘cim_invoke_method’
#  599|   		list_sort(arglist, comparef);
#  600|   		argnode = list_first(arglist);
#  601|-> 		arraynode = (methodarglist_t *)argnode->list_data;
#  602|   		argnode = list_next(arglist, argnode);
#  603|   		while (argnode) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def87]
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:618:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argnode’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1784:1: enter_function: entry to ‘cim_invoke_method’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1801:20: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1802:25: branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1802:25: call_function: inlined call to ‘cim_add_keys’ from ‘cim_invoke_method’
 branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1805:12: branch_true: following ‘true’ branch (when ‘objectpath’ is non-NULL)...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1809:17: branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1815:20: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1817:34: call_function: calling ‘cim_add_args’ from ‘cim_invoke_method’
#  616|   			CMPIValue value;
#  617|   			key_value_t *sentry;
#  618|-> 			node_val = (methodarglist_t *)argnode->list_data;
#  619|   			sentry = (key_value_t *)node_val->data;
#  620|   			if (0 < node_val->arraycount) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def88]
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:629:51: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘t_anode’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1784:1: enter_function: entry to ‘cim_invoke_method’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1801:20: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1802:25: branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1802:25: call_function: inlined call to ‘cim_add_keys’ from ‘cim_invoke_method’
 branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1805:12: branch_true: following ‘true’ branch (when ‘objectpath’ is non-NULL)...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1809:17: branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1815:20: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1817:34: call_function: calling ‘cim_add_args’ from ‘cim_invoke_method’
#  627|   				// first verify if array type is the same for all elements in the array.
#  628|   				for (kk = 1; kk < node_val->arraycount; kk++) {
#  629|-> 					t_anode = list_next(arglist, t_anode);
#  630|   					if (NULL != t_anode) {
#  631|   						key_value_t *t_sentry = (key_value_t *)((methodarglist_t *)t_anode->list_data)->data;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def89]
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:658:51: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argnode’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1784:1: enter_function: entry to ‘cim_invoke_method’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1801:20: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1802:25: branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1802:25: call_function: inlined call to ‘cim_add_keys’ from ‘cim_invoke_method’
 branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1805:12: branch_true: following ‘true’ branch (when ‘objectpath’ is non-NULL)...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1809:17: branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1815:20: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1817:34: call_function: calling ‘cim_add_args’ from ‘cim_invoke_method’
#  656|   						CMSetArrayElementAt(arraydata, jj, &value, CMPI_string);
#  657|   					}
#  658|-> 					argnode = list_next(arglist, argnode);
#  659|   					if (NULL != argnode)
#  660|   						sentry = (key_value_t *)((methodarglist_t *)argnode->list_data)->data;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def90]
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:991:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘_class’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1344:1: enter_function: entry to ‘cim_getEprObjAt’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1363:15: call_function: calling ‘cim_find_namespace_for_class’ from ‘cim_getEprObjAt’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1363:15: return_function: returning to ‘cim_getEprObjAt’ from ‘cim_find_namespace_for_class’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1365:12: branch_true: following ‘true’ branch (when ‘retval != 0’)...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1367:25: branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1369:17: call_function: calling ‘instance2xml’ from ‘cim_getEprObjAt’
#  989|   		if (strcmp(client->requested_class, "*")
#  990|   				&& enumInfo && (enumInfo->flags & WSMAN_ENUMINFO_POLY_EXCLUDE)) {
#  991|-> 			_class->ft->getPropertyAt(_class, i, &propertyname,
#  992|   					NULL);
#  993|   			data = instance->ft->getProperty(instance, CMGetCharPtr(propertyname),

Error: COMPILER_WARNING (CWE-563): [#def91]
openwsman-2.8.1/src/plugins/redirect/redirect.c: scope_hint: In function ‘set_namespaces’
openwsman-2.8.1/src/plugins/redirect/redirect.c:65:9: warning[-Wunused-variable]: unused variable ‘i’
#   65 |     int i;
#      |         ^
#   63|   {
#   64|   
#   65|->     int i;
#   66|   
#   67|       list_t *l = list_create(LISTCOUNT_T_MAX);

Error: COMPILER_WARNING (CWE-1164): [#def92]
openwsman-2.8.1/src/plugins/redirect/redirect.c:96:12: warning[-Wunused-function]: ‘init’ defined but not used
#   96 | static int init( void *self, void **data )
#      |            ^~~~
#   94|   
#   95|   
#   96|-> static int init( void *self, void **data )
#   97|   {
#   98|       char* filename;

Error: COMPILER_WARNING (CWE-1164): [#def93]
openwsman-2.8.1/src/plugins/redirect/redirect.c:144:13: warning[-Wunused-function]: ‘cleanup’ defined but not used
#  144 | static void cleanup( void  *self, void *data )
#      |             ^~~~~~~
#  142|   }
#  143|   
#  144|-> static void cleanup( void  *self, void *data )
#  145|   {
#  146|       free(redirect_data);

Error: COMPILER_WARNING (CWE-1164): [#def94]
openwsman-2.8.1/src/plugins/redirect/redirect.c:150:13: warning[-Wunused-function]: ‘set_config’ defined but not used
#  150 | static void set_config( void *self, dictionary *config )
#      |             ^~~~~~~~~~
#  148|   }
#  149|   
#  150|-> static void set_config( void *self, dictionary *config )
#  151|   {
#  152|       if (config == NULL)

Error: COMPILER_WARNING (CWE-1164): [#def95]
openwsman-2.8.1/src/plugins/redirect/redirect.c:238:14: warning[-Wunused-function]: ‘get_remote_namespace’ defined but not used
#  238 | static char* get_remote_namespace()
#      |              ^~~~~~~~~~~~~~~~~~~~
#  236|   }
#  237|   
#  238|-> static char* get_remote_namespace()
#  239|   {
#  240|   	return redirect_data->namespace;

Error: COMPILER_WARNING (CWE-1164): [#def96]
openwsman-2.8.1/src/plugins/redirect/redirect.c: scope_hint: At top level
openwsman-2.8.1/src/plugins/redirect/redirect.c:249:14: warning[-Wunused-function]: ‘get_remote_cim_namespace’ defined but not used
#  249 | static char* get_remote_cim_namespace()
#      |              ^~~~~~~~~~~~~~~~~~~~~~~~
#  247|   }
#  248|   
#  249|-> static char* get_remote_cim_namespace()
#  250|   {
#  251|   	return redirect_data->cim_namespace;

Error: COMPILER_WARNING (CWE-1164): [#def97]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:31: included_from: Included from here.
openwsman-2.8.1/src/plugins/redirect/redirect.h: scope_hint: At top level
openwsman-2.8.1/src/plugins/redirect/redirect.h:82:14: warning[-Wunused-function]: ‘get_remote_server’ declared ‘static’ but never defined
#   82 | static char* get_remote_server();
#      |              ^~~~~~~~~~~~~~~~~
#   80|   //void set_config( void *self, dictionary *config );
#   81|   
#   82|-> static char* get_remote_server();
#   83|   static char* get_remote_username();
#   84|   static char* get_remote_password();

Error: COMPILER_WARNING (CWE-1164): [#def98]
openwsman-2.8.1/src/plugins/redirect/redirect.h:83:14: warning[-Wunused-function]: ‘get_remote_username’ declared ‘static’ but never defined
#   83 | static char* get_remote_username();
#      |              ^~~~~~~~~~~~~~~~~~~
#   81|   
#   82|   static char* get_remote_server();
#   83|-> static char* get_remote_username();
#   84|   static char* get_remote_password();
#   85|   static char* get_remote_url_path();

Error: COMPILER_WARNING (CWE-1164): [#def99]
openwsman-2.8.1/src/plugins/redirect/redirect.h:84:14: warning[-Wunused-function]: ‘get_remote_password’ declared ‘static’ but never defined
#   84 | static char* get_remote_password();
#      |              ^~~~~~~~~~~~~~~~~~~
#   82|   static char* get_remote_server();
#   83|   static char* get_remote_username();
#   84|-> static char* get_remote_password();
#   85|   static char* get_remote_url_path();
#   86|   static char* get_remote_authentication_method();

Error: COMPILER_WARNING (CWE-1164): [#def100]
openwsman-2.8.1/src/plugins/redirect/redirect.h:85:14: warning[-Wunused-function]: ‘get_remote_url_path’ declared ‘static’ but never defined
#   85 | static char* get_remote_url_path();
#      |              ^~~~~~~~~~~~~~~~~~~
#   83|   static char* get_remote_username();
#   84|   static char* get_remote_password();
#   85|-> static char* get_remote_url_path();
#   86|   static char* get_remote_authentication_method();
#   87|   static char* get_remote_cim_namespace();

Error: COMPILER_WARNING (CWE-1164): [#def101]
openwsman-2.8.1/src/plugins/redirect/redirect.h:86:14: warning[-Wunused-function]: ‘get_remote_authentication_method’ declared ‘static’ but never defined
#   86 | static char* get_remote_authentication_method();
#      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   84|   static char* get_remote_password();
#   85|   static char* get_remote_url_path();
#   86|-> static char* get_remote_authentication_method();
#   87|   static char* get_remote_cim_namespace();
#   88|   static char* get_remote_cainfo();

Error: COMPILER_WARNING (CWE-1164): [#def102]
openwsman-2.8.1/src/plugins/redirect/redirect.h:87:14: warning[-Wunused-function]: ‘get_remote_cim_namespace’ declared ‘static’ but never defined
#   87 | static char* get_remote_cim_namespace();
#      |              ^~~~~~~~~~~~~~~~~~~~~~~~
#   85|   static char* get_remote_url_path();
#   86|   static char* get_remote_authentication_method();
#   87|-> static char* get_remote_cim_namespace();
#   88|   static char* get_remote_cainfo();
#   89|   static int get_remote_server_port();

Error: COMPILER_WARNING (CWE-1164): [#def103]
openwsman-2.8.1/src/plugins/redirect/redirect.h:88:14: warning[-Wunused-function]: ‘get_remote_cainfo’ declared ‘static’ but never defined
#   88 | static char* get_remote_cainfo();
#      |              ^~~~~~~~~~~~~~~~~
#   86|   static char* get_remote_authentication_method();
#   87|   static char* get_remote_cim_namespace();
#   88|-> static char* get_remote_cainfo();
#   89|   static int get_remote_server_port();
#   90|   static int get_remote_noverifypeer();

Error: COMPILER_WARNING (CWE-1164): [#def104]
openwsman-2.8.1/src/plugins/redirect/redirect.h:89:12: warning[-Wunused-function]: ‘get_remote_server_port’ declared ‘static’ but never defined
#   89 | static int get_remote_server_port();
#      |            ^~~~~~~~~~~~~~~~~~~~~~
#   87|   static char* get_remote_cim_namespace();
#   88|   static char* get_remote_cainfo();
#   89|-> static int get_remote_server_port();
#   90|   static int get_remote_noverifypeer();
#   91|   static int get_remote_noverifyhost();

Error: COMPILER_WARNING (CWE-1164): [#def105]
openwsman-2.8.1/src/plugins/redirect/redirect.h:90:12: warning[-Wunused-function]: ‘get_remote_noverifypeer’ declared ‘static’ but never defined
#   90 | static int get_remote_noverifypeer();
#      |            ^~~~~~~~~~~~~~~~~~~~~~~
#   88|   static char* get_remote_cainfo();
#   89|   static int get_remote_server_port();
#   90|-> static int get_remote_noverifypeer();
#   91|   static int get_remote_noverifyhost();
#   92|   static char* get_remote_sslkey();

Error: COMPILER_WARNING (CWE-1164): [#def106]
openwsman-2.8.1/src/plugins/redirect/redirect.h:91:12: warning[-Wunused-function]: ‘get_remote_noverifyhost’ declared ‘static’ but never defined
#   91 | static int get_remote_noverifyhost();
#      |            ^~~~~~~~~~~~~~~~~~~~~~~
#   89|   static int get_remote_server_port();
#   90|   static int get_remote_noverifypeer();
#   91|-> static int get_remote_noverifyhost();
#   92|   static char* get_remote_sslkey();
#   93|   static char* get_remote_cl_cert();

Error: COMPILER_WARNING (CWE-1164): [#def107]
openwsman-2.8.1/src/plugins/redirect/redirect.h:92:14: warning[-Wunused-function]: ‘get_remote_sslkey’ declared ‘static’ but never defined
#   92 | static char* get_remote_sslkey();
#      |              ^~~~~~~~~~~~~~~~~
#   90|   static int get_remote_noverifypeer();
#   91|   static int get_remote_noverifyhost();
#   92|-> static char* get_remote_sslkey();
#   93|   static char* get_remote_cl_cert();
#   94|   

Error: COMPILER_WARNING (CWE-1164): [#def108]
openwsman-2.8.1/src/plugins/redirect/redirect.h:93:14: warning[-Wunused-function]: ‘get_remote_cl_cert’ declared ‘static’ but never defined
#   93 | static char* get_remote_cl_cert();
#      |              ^~~~~~~~~~~~~~~~~~
#   91|   static int get_remote_noverifyhost();
#   92|   static char* get_remote_sslkey();
#   93|-> static char* get_remote_cl_cert();
#   94|   
#   95|   WsManClient* setup_redirect_client (WsContextH cntx, char *username, char *password);

Error: COMPILER_WARNING (CWE-563): [#def109]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:125:11: warning[-Wunused-variable]: unused variable ‘resource_uri’
#  125 |     char *resource_uri, *remote_enumContext=NULL;
#      |           ^~~~~~~~~~~~
#  123|       WsXmlNodeH r_header=NULL, r_node=NULL, r_body=NULL, r_opt=NULL;
#  124|       WsXmlDocH r_response=NULL;
#  125|->     char *resource_uri, *remote_enumContext=NULL;
#  126|       int op; 
#  127|       WsManClient *cl=NULL;

Error: COMPILER_WARNING (CWE-563): [#def110]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c: scope_hint: In function ‘Redirect_Enumerate_EP’
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:126:9: warning[-Wunused-variable]: unused variable ‘op’
#  126 |     int op;
#      |         ^~
#  124|       WsXmlDocH r_response=NULL;
#  125|       char *resource_uri, *remote_enumContext=NULL;
#  126|->     int op; 
#  127|       WsManClient *cl=NULL;
#  128|   

Error: COMPILER_WARNING: [#def111]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c: scope_hint: In function ‘Redirect_Enumerate_EP’
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:197:13: warning[-Wstringop-truncation]: ‘__strncpy_chk’ specified bound depends on the length of the source argument
#  197 |             strncpy(enumInfo->enumId, remote_enumContext, strlen(remote_enumContext)+1);
#      |             ^
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:197:59: note: length computed here
#  197 |             strncpy(enumInfo->enumId, remote_enumContext, strlen(remote_enumContext)+1);
#      |                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
#  195|   
#  196|   	if( strlen(remote_enumContext) != 0 )
#  197|-> 	    strncpy(enumInfo->enumId, remote_enumContext, strlen(remote_enumContext)+1);
#  198|       
#  199|   	else  // If all the instances are returned, the context will be NULL

Error: COMPILER_WARNING: [#def112]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:206:13: warning[-Wstringop-truncation]: ‘__strncpy_chk’ specified bound depends on the length of the source argument
#  206 |             strncpy(enumInfo->enumId, remote_enumContext, strlen(remote_enumContext)+1);
#      |             ^
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:206:59: note: length computed here
#  206 |             strncpy(enumInfo->enumId, remote_enumContext, strlen(remote_enumContext)+1);
#      |                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
#  204|       else{
#  205|   	    //If not items are returned, set the context and return. 
#  206|-> 	    strncpy(enumInfo->enumId, remote_enumContext, strlen(remote_enumContext)+1);
#  207|   	    ws_xml_destroy_doc(r_response);
#  208|   	

Error: COMPILER_WARNING (CWE-563): [#def113]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c: scope_hint: In function ‘Redirect_Pull_EP’
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:247:15: warning[-Wunused-variable]: unused variable ‘doc’
#  247 |     WsXmlDocH doc=NULL,response=NULL;
#      |               ^~~
#  245|   			WsmanStatus *status, void *opaqueData)
#  246|   {
#  247|->     WsXmlDocH doc=NULL,response=NULL;
#  248|       WsManClient *cl=NULL;
#  249|       int retVal=0;

Error: COMPILER_WARNING (CWE-1164): [#def114]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:304:13: warning[-Wunused-function]: ‘xml_print’ defined but not used
#  304 | static void xml_print( WsXmlDocH doc)
#      |             ^~~~~~~~~
#  302|   
#  303|   
#  304|-> static void xml_print( WsXmlDocH doc)
#  305|   {
#  306|   

Error: CPPCHECK_WARNING (CWE-476): [#def115]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:330: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fault_msg
#  328|       char* fault_msg =calloc(1,strlen(prepend_string)+strlen(last_error_string)+2);
#  329|   
#  330|->     strncpy(fault_msg, prepend_string, strlen(prepend_string));
#  331|       strncat(fault_msg, last_error_string, strlen(last_error_string));
#  332|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def116]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:330:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fault_msg’ where non-null expected
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:328:22: acquire_memory: this call could return NULL
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:330:5: danger: argument 1 (‘fault_msg’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#argument 1 of ‘__builtin_memcpy’ must be non-null
#  328|       char* fault_msg =calloc(1,strlen(prepend_string)+strlen(last_error_string)+2);
#  329|   
#  330|->     strncpy(fault_msg, prepend_string, strlen(prepend_string));
#  331|       strncat(fault_msg, last_error_string, strlen(last_error_string));
#  332|   

Error: COMPILER_WARNING: [#def117]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c: scope_hint: In function ‘redirect_fault_msg’
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:330:5: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying 17 bytes from a string of the same length
#  330 |     strncpy(fault_msg, prepend_string, strlen(prepend_string));
#      |     ^
#  328|       char* fault_msg =calloc(1,strlen(prepend_string)+strlen(last_error_string)+2);
#  329|   
#  330|->     strncpy(fault_msg, prepend_string, strlen(prepend_string));
#  331|       strncat(fault_msg, last_error_string, strlen(last_error_string));
#  332|   

Error: CPPCHECK_WARNING (CWE-476): [#def118]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:331: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fault_msg
#  329|   
#  330|       strncpy(fault_msg, prepend_string, strlen(prepend_string));
#  331|->     strncat(fault_msg, last_error_string, strlen(last_error_string));
#  332|   
#  333|       return fault_msg;

Error: COMPILER_WARNING: [#def119]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:331:5: note[note]: length computed here
#  329|   
#  330|       strncpy(fault_msg, prepend_string, strlen(prepend_string));
#  331|->     strncat(fault_msg, last_error_string, strlen(last_error_string));
#  332|   
#  333|       return fault_msg;

Error: COMPILER_WARNING: [#def120]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c: scope_hint: In function ‘redirect_fault_msg’
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:331:5: warning[-Wstringop-overflow=]: ‘__builtin___strncat_chk’ specified bound depends on the length of the source argument
#  331 |     strncat(fault_msg, last_error_string, strlen(last_error_string));
#      |     ^
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:331:43: note: length computed here
#  331 |     strncat(fault_msg, last_error_string, strlen(last_error_string));
#      |                                           ^
#  329|   
#  330|       strncpy(fault_msg, prepend_string, strlen(prepend_string));
#  331|->     strncat(fault_msg, last_error_string, strlen(last_error_string));
#  332|   
#  333|       return fault_msg;

Error: COMPILER_WARNING: [#def121]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:331:5: warning[-Wstringop-overflow=]: ‘__strncat_chk’ specified bound depends on the length of the source argument
#  331 |     strncat(fault_msg, last_error_string, strlen(last_error_string));
#      |     ^
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:331:43: note: length computed here
#  331 |     strncat(fault_msg, last_error_string, strlen(last_error_string));
#      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~
#  329|   
#  330|       strncpy(fault_msg, prepend_string, strlen(prepend_string));
#  331|->     strncat(fault_msg, last_error_string, strlen(last_error_string));
#  332|   
#  333|       return fault_msg;

Error: COMPILER_WARNING: [#def122]
openwsman-2.8.1/src/plugins/redirect/redirect_stubs.c:331:5: warning[-Wstringop-overflow=]: ‘strncat’ specified bound depends on the length of the source argument
#  329|   
#  330|       strncpy(fault_msg, prepend_string, strlen(prepend_string));
#  331|->     strncat(fault_msg, last_error_string, strlen(last_error_string));
#  332|   
#  333|       return fault_msg;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def123]
openwsman-2.8.1/src/server/shttpd/auth.c:42:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:19: acquire_resource: opened here
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:442:9: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   40|   	int		i;
#   41|   
#   42|-> 	MD5Init(&ctx);
#   43|   
#   44|   	va_start(ap, buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def124]
openwsman-2.8.1/src/server/shttpd/auth.c:42:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp2’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: acquire_resource: opened here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:442:9: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   40|   	int		i;
#   41|   
#   42|-> 	MD5Init(&ctx);
#   43|   
#   44|   	va_start(ap, buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
openwsman-2.8.1/src/server/shttpd/auth.c:42:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:19: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:442:9: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   40|   	int		i;
#   41|   
#   42|-> 	MD5Init(&ctx);
#   43|   
#   44|   	va_start(ap, buf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
openwsman-2.8.1/src/server/shttpd/auth.c:42:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp2’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:442:9: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   40|   	int		i;
#   41|   
#   42|-> 	MD5Init(&ctx);
#   43|   
#   44|   	va_start(ap, buf);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def127]
openwsman-2.8.1/src/server/shttpd/auth.c:50:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:19: acquire_resource: opened here
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:440:57: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   48|   			continue;
#   49|   		if (i > 0)
#   50|-> 			MD5Update(&ctx, (unsigned char *) ":", 1);
#   51|   		MD5Update(&ctx,(unsigned char *)v->ptr,(unsigned int)v->len);
#   52|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
openwsman-2.8.1/src/server/shttpd/auth.c:50:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:19: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:440:57: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   48|   			continue;
#   49|   		if (i > 0)
#   50|-> 			MD5Update(&ctx, (unsigned char *) ":", 1);
#   51|   		MD5Update(&ctx,(unsigned char *)v->ptr,(unsigned int)v->len);
#   52|   	}

Error: GCC_ANALYZER_WARNING (CWE-404): [#def129]
openwsman-2.8.1/src/server/shttpd/auth.c:50:25: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:442:9: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   48|   			continue;
#   49|   		if (i > 0)
#   50|-> 			MD5Update(&ctx, (unsigned char *) ":", 1);
#   51|   		MD5Update(&ctx,(unsigned char *)v->ptr,(unsigned int)v->len);
#   52|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def130]
openwsman-2.8.1/src/server/shttpd/auth.c:51:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:19: acquire_resource: opened here
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:442:9: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   49|   		if (i > 0)
#   50|   			MD5Update(&ctx, (unsigned char *) ":", 1);
#   51|-> 		MD5Update(&ctx,(unsigned char *)v->ptr,(unsigned int)v->len);
#   52|   	}
#   53|   	va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def131]
openwsman-2.8.1/src/server/shttpd/auth.c:51:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp2’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: acquire_resource: opened here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:442:9: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   49|   		if (i > 0)
#   50|   			MD5Update(&ctx, (unsigned char *) ":", 1);
#   51|-> 		MD5Update(&ctx,(unsigned char *)v->ptr,(unsigned int)v->len);
#   52|   	}
#   53|   	va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
openwsman-2.8.1/src/server/shttpd/auth.c:51:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:19: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:442:9: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   49|   		if (i > 0)
#   50|   			MD5Update(&ctx, (unsigned char *) ":", 1);
#   51|-> 		MD5Update(&ctx,(unsigned char *)v->ptr,(unsigned int)v->len);
#   52|   	}
#   53|   	va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
openwsman-2.8.1/src/server/shttpd/auth.c:51:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fp2’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:442:9: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   49|   		if (i > 0)
#   50|   			MD5Update(&ctx, (unsigned char *) ":", 1);
#   51|-> 		MD5Update(&ctx,(unsigned char *)v->ptr,(unsigned int)v->len);
#   52|   	}
#   53|   	va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def134]
openwsman-2.8.1/src/server/shttpd/auth.c:51:17: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:442:9: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   49|   		if (i > 0)
#   50|   			MD5Update(&ctx, (unsigned char *) ":", 1);
#   51|-> 		MD5Update(&ctx,(unsigned char *)v->ptr,(unsigned int)v->len);
#   52|   	}
#   53|   	va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def135]
openwsman-2.8.1/src/server/shttpd/auth.c:55:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:19: acquire_resource: opened here
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:440:57: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   53|   	va_end(ap);
#   54|   
#   55|-> 	MD5Final(hash, &ctx);
#   56|   	bin2str(buf, hash, sizeof(hash));
#   57|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
openwsman-2.8.1/src/server/shttpd/auth.c:55:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:19: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:440:57: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
#   53|   	va_end(ap);
#   54|   
#   55|-> 	MD5Final(hash, &ctx);
#   56|   	bin2str(buf, hash, sizeof(hash));
#   57|   }

Error: COMPILER_WARNING (CWE-1164): [#def137]
openwsman-2.8.1/src/server/shttpd/auth.c:174:1: warning[-Wunused-function]: ‘open_auth_file’ defined but not used
#  174 | open_auth_file(struct shttpd_ctx *ctx, const char *path)
#      | ^~~~~~~~~~~~~~
#  172|   
#  173|   static FILE *
#  174|-> open_auth_file(struct shttpd_ctx *ctx, const char *path)
#  175|   {
#  176|   	char 		name[FILENAME_MAX];

Error: GCC_ANALYZER_WARNING (CWE-775): [#def138]
openwsman-2.8.1/src/server/shttpd/auth.c:439:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(fname, "r")’
openwsman-2.8.1/src/server/shttpd/auth.c:435:19: acquire_resource: opened here
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:440:57: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:439:17: danger: ‘fopen(fname, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
#  437|   		    "Cannot open %s: %s", fname, strerror(errno));
#  438|   	else if ((fp2 = fopen(tmp, "w+")) == NULL)
#  439|-> 		_shttpd_elog(E_FATAL, NULL,
#  440|   		    "Cannot open %s: %s", tmp, strerror(errno));
#  441|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
openwsman-2.8.1/src/server/shttpd/auth.c:439:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(fname, "r")’
openwsman-2.8.1/src/server/shttpd/auth.c:435:19: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:440:57: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:439:17: danger: ‘fopen(fname, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
#  437|   		    "Cannot open %s: %s", fname, strerror(errno));
#  438|   	else if ((fp2 = fopen(tmp, "w+")) == NULL)
#  439|-> 		_shttpd_elog(E_FATAL, NULL,
#  440|   		    "Cannot open %s: %s", tmp, strerror(errno));
#  441|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def140]
openwsman-2.8.1/src/server/shttpd/auth.c:446:16: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(fname, "r")’ where non-null expected
openwsman-2.8.1/src/server/shttpd/auth.c:435:19: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: release_memory: assuming ‘fopen(fname, "r")’ is NULL
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:437:59: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:446:16: danger: argument 3 (‘fopen(fname, "r")’) NULL where non-null expected
#  444|   
#  445|   	/* Copy the stuff to temporary file */
#  446|-> 	while (fgets(line, sizeof(line), fp) != NULL) {
#  447|   		u.ptr = line;
#  448|   		if ((d.ptr = strchr(line, ':')) == NULL)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def141]
openwsman-2.8.1/src/server/shttpd/auth.c:462:32: warning[-Wanalyzer-null-argument]: use of NULL ‘fp2’ where non-null expected
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:440:57: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:446:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:447:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:448:20: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:450:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:452:20: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:454:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:456:20: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:457:22: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:456:21: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:458:27: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:456:21: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:459:22: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:456:21: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:460:25: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:461:25: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:461:25: return_function: returning to ‘_shttpd_edit_passwords’ from ‘md5’
openwsman-2.8.1/src/server/shttpd/auth.c:462:32: danger: argument 1 (‘fp2’) NULL where non-null expected
#  460|   			found++;
#  461|   			md5(ha1, &u, &d, &p, NULL);
#  462|-> 			(void) fprintf(fp2, "%s:%s:%.32s\n", user, domain, ha1);
#  463|   		} else {
#  464|   			(void) fprintf(fp2, "%s", line);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def142]
openwsman-2.8.1/src/server/shttpd/auth.c:464:32: warning[-Wanalyzer-null-argument]: use of NULL ‘fp2’ where non-null expected
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:440:57: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:446:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:447:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:448:20: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:450:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:452:20: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:454:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:464:32: danger: argument 2 (‘fp2’) NULL where non-null expected
#argument 2 of ‘__builtin_fputs’ must be non-null
#  462|   			(void) fprintf(fp2, "%s:%s:%.32s\n", user, domain, ha1);
#  463|   		} else {
#  464|-> 			(void) fprintf(fp2, "%s", line);
#  465|   		}
#  466|   	}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def143]
openwsman-2.8.1/src/server/shttpd/auth.c:473:24: warning[-Wanalyzer-null-argument]: use of NULL ‘fp2’ where non-null expected
openwsman-2.8.1/src/server/shttpd/auth.c:420:1: enter_function: entry to ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:435:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:438:25: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:438:17: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/auth.c:440:57: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:469:12: branch_true: following ‘true’ branch (when ‘found == 0’)...
openwsman-2.8.1/src/server/shttpd/auth.c:470:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: call_function: calling ‘md5’ from ‘_shttpd_edit_passwords’
openwsman-2.8.1/src/server/shttpd/auth.c:472:17: return_function: returning to ‘_shttpd_edit_passwords’ from ‘md5’
openwsman-2.8.1/src/server/shttpd/auth.c:473:24: danger: argument 1 (‘fp2’) NULL where non-null expected
#  471|   		d.ptr = domain; d.len = strlen(domain);
#  472|   		md5(ha1, &u, &d, &p, NULL);
#  473|-> 		(void) fprintf(fp2, "%s:%s:%.32s\n", user, domain, ha1);
#  474|   	}
#  475|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
openwsman-2.8.1/src/server/shttpd/io_emb.c:178:43: warning[-Wanalyzer-malloc-leak]: leak of ‘e’
openwsman-2.8.1/src/server/shttpd/io_emb.c:177:18: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/io_emb.c:177:12: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
openwsman-2.8.1/src/server/shttpd/io_emb.c:178:43: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/io_emb.c:178:43: danger: ‘e’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  176|   
#  177|   	if ((e = malloc(sizeof(*e))) != NULL) {
#  178|-> 		e->uri			= _shttpd_strdup(uri);
#  179|   		e->callback.v_func	= (void (*)(void)) callback;
#  180|   		e->callback_data	= data;

Error: CPPCHECK_WARNING (CWE-401): [#def145]
openwsman-2.8.1/src/server/shttpd/io_emb.c:211: error[memleak]: Memory leak: auth.file_name
#  209|                   LL_ADD(&ctx->uri_auths, &auth->link);
#  210|           }
#  211|-> }
#  212|   
#  213|   int

Error: CPPCHECK_WARNING (CWE-401): [#def146]
openwsman-2.8.1/src/server/shttpd/io_emb.c:211: error[memleak]: Memory leak: auth.uri
#  209|                   LL_ADD(&ctx->uri_auths, &auth->link);
#  210|           }
#  211|-> }
#  212|   
#  213|   int

Error: COMPILER_WARNING (CWE-1164): [#def147]
openwsman-2.8.1/src/server/shttpd/shttpd.c:500:1: warning[-Wunused-function]: ‘find_index_file’ defined but not used
#  500 | find_index_file(struct conn *c, char *path, size_t maxpath, struct stat *stp)
#      | ^~~~~~~~~~~~~~~
#  498|    */
#  499|   static int
#  500|-> find_index_file(struct conn *c, char *path, size_t maxpath, struct stat *stp)
#  501|   {
#  502|   	char		buf[FILENAME_MAX];

Error: COMPILER_WARNING (CWE-1164): [#def148]
openwsman-2.8.1/src/server/shttpd/shttpd.c: scope_hint: At top level
openwsman-2.8.1/src/server/shttpd/shttpd.c:525:1: warning[-Wunused-function]: ‘get_path_info’ defined but not used
#  525 | get_path_info(struct conn *c, char *path, struct stat *stp)
#      | ^~~~~~~~~~~~~
#  523|    */
#  524|   static int
#  525|-> get_path_info(struct conn *c, char *path, struct stat *stp)
#  526|   {
#  527|   	char	*p, *e;

Error: COMPILER_WARNING (CWE-563): [#def149]
openwsman-2.8.1/src/server/shttpd/shttpd.c:553:40: warning[-Wunused-variable]: unused variable ‘buf’
#  553 |         char            path[URI_MAX], buf[1024], *root;
#      |                                        ^~~
#  551|   decide_what_to_do(struct conn *c)
#  552|   {
#  553|-> 	char		path[URI_MAX], buf[1024], *root;
#  554|   	struct vec	alias_uri, alias_path;
#  555|   	struct stat	st;

Error: COMPILER_WARNING (CWE-563): [#def150]
openwsman-2.8.1/src/server/shttpd/shttpd.c:555:25: warning[-Wunused-variable]: unused variable ‘st’
#  555 |         struct stat     st;
#      |                         ^~
#  553|   	char		path[URI_MAX], buf[1024], *root;
#  554|   	struct vec	alias_uri, alias_path;
#  555|-> 	struct stat	st;
#  556|   	int		rc;
#  557|   	struct registered_uri	*ruri;

Error: COMPILER_WARNING (CWE-563): [#def151]
openwsman-2.8.1/src/server/shttpd/shttpd.c: scope_hint: In function ‘decide_what_to_do’
openwsman-2.8.1/src/server/shttpd/shttpd.c:556:25: warning[-Wunused-variable]: unused variable ‘rc’
#  556 |         int             rc;
#      |                         ^~
#  554|   	struct vec	alias_uri, alias_path;
#  555|   	struct stat	st;
#  556|-> 	int		rc;
#  557|   	struct registered_uri	*ruri;
#  558|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
openwsman-2.8.1/src/server/shttpd/shttpd.c:825:17: warning[-Wanalyzer-malloc-leak]: leak of ‘c’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1424:1: enter_function: entry to ‘set_inetd’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1429:17: call_function: calling ‘shttpd_set_option’ from ‘set_inetd’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1429:17: return_function: returning to ‘set_inetd’ from ‘shttpd_set_option’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1431:17: call_function: calling ‘add_socket’ from ‘set_inetd’
#  823|   		c->loc_port = sa.u.sin.sin_port;
#  824|   
#  825|-> 		_shttpd_set_close_on_exec(sock);
#  826|   
#  827|   		c->loc.io_class	= NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
openwsman-2.8.1/src/server/shttpd/shttpd.c:842:25: warning[-Wanalyzer-malloc-leak]: leak of ‘c’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1660:1: enter_function: entry to ‘poll_worker’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1665:9: branch_true: following ‘true’ branch (when ‘__i != 16’)...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1665:9: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1666:9: branch_true: following ‘true’ branch (when ‘__i != 16’)...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1666:9: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1671:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1674:9: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1674:9: call_function: calling ‘process_worker_sockets’ from ‘poll_worker’
#  840|   			c->rem.chan.ssl.sock = sock;
#  841|   			c->rem.chan.ssl.ssl = ssl;
#  842|-> 			_shttpd_ssl_handshake(&c->rem);
#  843|   		}
#  844|   #endif /* NO_SSL */

Error: CPPCHECK_WARNING (CWE-476): [#def154]
openwsman-2.8.1/src/server/shttpd/shttpd.c:858: error[ctunullpointer]: Null pointer dereference: ctx
#  856|   first_worker(struct shttpd_ctx *ctx)
#  857|   {
#  858|-> 	return (LL_ENTRY(ctx->workers.next, struct worker, link));
#  859|   }
#  860|   

Error: CPPCHECK_WARNING (CWE-476): [#def155]
openwsman-2.8.1/src/server/shttpd/shttpd.c:858: warning[nullPointer]: Possible null pointer dereference: ctx
#  856|   first_worker(struct shttpd_ctx *ctx)
#  857|   {
#  858|-> 	return (LL_ENTRY(ctx->workers.next, struct worker, link));
#  859|   }
#  860|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def156]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1404:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor
openwsman-2.8.1/src/server/shttpd/shttpd.c:1690:1: enter_function: entry to ‘set_workers’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1701:12: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1702:20: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1710:24: call_function: calling ‘add_worker’ from ‘set_workers’
# 1402|   		/* Failure, close descriptors */
# 1403|   		if (sp[0] != -1)
# 1404|-> 			(void) closesocket(sp[0]);
# 1405|   		if (sp[1] != -1)
# 1406|   			(void) closesocket(sp[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def157]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1404:32: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1690:1: enter_function: entry to ‘set_workers’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1701:12: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1702:20: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1710:24: call_function: calling ‘add_worker’ from ‘set_workers’
# 1402|   		/* Failure, close descriptors */
# 1403|   		if (sp[0] != -1)
# 1404|-> 			(void) closesocket(sp[0]);
# 1405|   		if (sp[1] != -1)
# 1406|   			(void) closesocket(sp[1]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def158]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1404:32: warning[-Wanalyzer-malloc-leak]: leak of ‘worker’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1690:1: enter_function: entry to ‘set_workers’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1701:12: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1702:20: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1710:24: call_function: calling ‘add_worker’ from ‘set_workers’
# 1402|   		/* Failure, close descriptors */
# 1403|   		if (sp[0] != -1)
# 1404|-> 			(void) closesocket(sp[0]);
# 1405|   		if (sp[1] != -1)
# 1406|   			(void) closesocket(sp[1]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def159]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1409:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1690:1: enter_function: entry to ‘set_workers’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1701:12: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1702:20: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1710:24: call_function: calling ‘add_worker’ from ‘set_workers’
# 1407|   	}
# 1408|   
# 1409|-> 	(void) closesocket(sock);
# 1410|   	(void) _shttpd_set_non_blocking_mode(sp[0]);
# 1411|   	(void) _shttpd_set_non_blocking_mode(sp[1]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1409:16: warning[-Wanalyzer-malloc-leak]: leak of ‘worker’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1690:1: enter_function: entry to ‘set_workers’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1701:12: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1702:20: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1710:24: call_function: calling ‘add_worker’ from ‘set_workers’
# 1407|   	}
# 1408|   
# 1409|-> 	(void) closesocket(sock);
# 1410|   	(void) _shttpd_set_non_blocking_mode(sp[0]);
# 1411|   	(void) _shttpd_set_non_blocking_mode(sp[1]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1410:16: warning[-Wanalyzer-malloc-leak]: leak of ‘worker’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1690:1: enter_function: entry to ‘set_workers’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1701:12: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1702:20: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1710:24: call_function: calling ‘add_worker’ from ‘set_workers’
# 1408|   
# 1409|   	(void) closesocket(sock);
# 1410|-> 	(void) _shttpd_set_non_blocking_mode(sp[0]);
# 1411|   	(void) _shttpd_set_non_blocking_mode(sp[1]);
# 1412|   

Error: COMPILER_WARNING (CWE-252): [#def162]
openwsman-2.8.1/src/server/shttpd/shttpd.c: scope_hint: In function ‘set_inetd’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1430:24: warning[-Wunused-result]: ignoring return value of ‘freopen’ declared with attribute ‘warn_unused_result’
# 1430 |                 (void) freopen("/dev/null", "a", stderr);
#      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1428|   	if (_shttpd_is_true(flag)) {
# 1429|   		shttpd_set_option(ctx, "ports", NULL);
# 1430|-> 		(void) freopen("/dev/null", "a", stderr);
# 1431|   		add_socket(first_worker(ctx), 0, 0);
# 1432|   	}

Error: COMPILER_WARNING (CWE-563): [#def163]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1506:26: warning[-Wunused-variable]: unused variable ‘lib’
# 1506 |         void            *lib;
#      |                          ^~~
# 1504|   {
# 1505|   	SSL_CTX		*CTX;
# 1506|-> 	void		*lib;
# 1507|   	struct ssl_func	*fp;
# 1508|   	char *ssl_disabled_protocols = wsmand_options_get_ssl_disabled_protocols();

Error: COMPILER_WARNING (CWE-563): [#def164]
openwsman-2.8.1/src/server/shttpd/shttpd.c: scope_hint: In function ‘set_ssl’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1507:26: warning[-Wunused-variable]: unused variable ‘fp’
# 1507 |         struct ssl_func *fp;
#      |                          ^~
# 1505|   	SSL_CTX		*CTX;
# 1506|   	void		*lib;
# 1507|-> 	struct ssl_func	*fp;
# 1508|   	char *ssl_disabled_protocols = wsmand_options_get_ssl_disabled_protocols();
# 1509|   	char *ssl_cipher_list = wsmand_options_get_ssl_cipher_list();

Error: GCC_ANALYZER_WARNING (CWE-476): [#def165]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1651:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘worker’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1690:1: enter_function: entry to ‘set_workers’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1701:12: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1702:20: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1710:24: call_function: calling ‘add_worker’ from ‘set_workers’
# 1649|   		_shttpd_elog(E_FATAL, NULL, "Cannot allocate worker");
# 1650|   	LL_INIT(&worker->connections);
# 1651|-> 	worker->ctx = ctx;
# 1652|   	(void) shttpd_socketpair(worker->ctl);
# 1653|   	LL_TAIL(&ctx->workers, &worker->link);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def166]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1780:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(config_file, "r")’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1889:1: enter_function: entry to ‘process_command_line_arguments’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1902:13: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1905:19: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1917:14: acquire_resource: opened here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1920:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1929:24: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1931:25: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1934:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1937:29: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1941:25: call_function: calling ‘set_opt’ from ‘process_command_line_arguments’
# 1778|   			return (known_options + i);
# 1779|   
# 1780|-> 	_shttpd_elog(E_FATAL, NULL, "no such option: [%s]", opt_name);
# 1781|   
# 1782|   	/* UNREACHABLE */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1780:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(config_file, "r")’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1889:1: enter_function: entry to ‘process_command_line_arguments’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1902:13: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1905:19: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1917:14: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1920:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1929:24: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1931:25: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1934:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1937:29: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1941:25: call_function: calling ‘set_opt’ from ‘process_command_line_arguments’
# 1778|   			return (known_options + i);
# 1779|   
# 1780|-> 	_shttpd_elog(E_FATAL, NULL, "no such option: [%s]", opt_name);
# 1781|   
# 1782|   	/* UNREACHABLE */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def168]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1793:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1787:1: enter_function: entry to ‘shttpd_set_option’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1789:38: call_function: calling ‘find_opt’ from ‘shttpd_set_option’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1789:38: return_function: returning to ‘shttpd_set_option’ from ‘find_opt’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1793:13: danger: dereference of NULL ‘find_opt(opt)’
# 1791|   
# 1792|   	/* Call option setter first, so it can use both new and old values */
# 1793|-> 	if (o->setter != NULL)
# 1794|   		retval = o->setter(ctx, val);
# 1795|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def169]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1883:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1878:1: enter_function: entry to ‘set_opt’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1882:13: call_function: calling ‘find_opt’ from ‘set_opt’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1882:13: return_function: returning to ‘set_opt’ from ‘find_opt’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1883:26: danger: dereference of NULL ‘find_opt(opt)’
# 1881|   
# 1882|   	o = find_opt(opt);
# 1883|-> 	if (ctx->options[o->index] != NULL)
# 1884|   		free(ctx->options[o->index]);
# 1885|   	ctx->options[o->index] = _shttpd_strdup(value);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def170]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1885:34: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(config_file, "r")’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1889:1: enter_function: entry to ‘process_command_line_arguments’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1902:13: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1905:19: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1917:14: acquire_resource: opened here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1920:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1929:24: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1931:25: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1934:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1937:29: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1941:25: call_function: calling ‘set_opt’ from ‘process_command_line_arguments’
# 1883|   	if (ctx->options[o->index] != NULL)
# 1884|   		free(ctx->options[o->index]);
# 1885|-> 	ctx->options[o->index] = _shttpd_strdup(value);
# 1886|   }
# 1887|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def171]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1885:34: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(config_file, "r")’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1889:1: enter_function: entry to ‘process_command_line_arguments’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1902:13: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1905:19: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1917:14: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1920:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1929:24: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1931:25: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1934:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1937:29: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1941:25: call_function: calling ‘set_opt’ from ‘process_command_line_arguments’
# 1883|   	if (ctx->options[o->index] != NULL)
# 1884|   		free(ctx->options[o->index]);
# 1885|-> 	ctx->options[o->index] = _shttpd_strdup(value);
# 1886|   }
# 1887|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def172]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(config_file, "r")’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1902:13: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1905:19: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1917:14: acquire_resource: opened here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1920:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: danger: ‘fopen(config_file, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2)
# 1924|   	if (fp != NULL) {
# 1925|   
# 1926|-> 		_shttpd_elog(E_LOG, NULL, "Loading config file %s", config_file);
# 1927|   
# 1928|   		/* Loop over the lines in config file */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(config_file, "r")’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1902:13: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1905:19: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1917:14: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1920:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: danger: ‘fopen(config_file, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
# 1924|   	if (fp != NULL) {
# 1925|   
# 1926|-> 		_shttpd_elog(E_LOG, NULL, "Loading config file %s", config_file);
# 1927|   
# 1928|   		/* Loop over the lines in config file */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def174]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1938:33: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(config_file, "r")’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1902:13: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1905:19: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1917:14: acquire_resource: opened here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1920:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1929:24: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1931:25: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1934:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1937:29: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1937:28: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1938:33: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1938:33: danger: ‘fopen(config_file, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
# 1936|   
# 1937|   			if (sscanf(line, "%s %[^\n#]", opt, val) != 2)
# 1938|-> 				_shttpd_elog(E_FATAL, NULL, "line %d in %s is invalid",
# 1939|   				    line_no, config_file);
# 1940|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def175]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1938:33: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(config_file, "r")’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1902:13: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1905:19: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1917:14: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1920:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1929:24: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1931:25: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1934:28: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1937:29: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1937:28: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1938:33: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1938:33: danger: ‘fopen(config_file, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
# 1936|   
# 1937|   			if (sscanf(line, "%s %[^\n#]", opt, val) != 2)
# 1938|-> 				_shttpd_elog(E_FATAL, NULL, "line %d in %s is invalid",
# 1939|   				    line_no, config_file);
# 1940|   

Error: COMPILER_WARNING (CWE-563): [#def176]
openwsman-2.8.1/src/server/shttpd/shttpd.c: scope_hint: In function ‘shttpd_init’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1956:34: warning[-Wunused-but-set-variable]: variable ‘tm’ set but not used
# 1956 |         struct tm               *tm;
#      |                                  ^~
# 1954|   {
# 1955|   	struct shttpd_ctx	*ctx;
# 1956|-> 	struct tm		*tm;
# 1957|   	const struct opt	*o;
# 1958|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1973:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ctx’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1959:20: acquire_memory: allocated here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1959:12: branch_false: following ‘false’ branch (when ‘ctx’ is non-NULL)...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1962:9: branch_false: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1971:33: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1972:42: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1972:42: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1973:25: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1973:25: danger: ‘ctx’ leaks here; was allocated at [(1)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/0)
# 1971|   	for (o = known_options; o->name != NULL; o++)
# 1972|   		ctx->options[o->index] = o->default_value ?
# 1973|-> 			_shttpd_strdup(o->default_value) : NULL;
# 1974|   
# 1975|   	/* Second and third passes: config file and argv */

Error: COMPILER_WARNING (CWE-563): [#def178]
openwsman-2.8.1/src/server/wsmand-listener.c: scope_hint: At top level
openwsman-2.8.1/src/server/wsmand-listener.c:96:26: warning[-Wunused-variable]: ‘threads’ defined but not used
#   96 | static struct thread    *threads;   /* List of worker threads */
#      |                          ^~~~~~~
#   94|   };
#   95|   
#   96|-> static struct thread    *threads;   /* List of worker threads */
#   97|   
#   98|   typedef struct {

Error: CPPCHECK_WARNING (CWE-476): [#def179]
openwsman-2.8.1/src/server/wsmand-listener.c:179: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  177|   
#  178|   	state = arg->state;
#  179|-> 	if ( state->response ) {
#  180|   		goto CONTINUE;
#  181|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def180]
openwsman-2.8.1/src/server/wsmand-listener.c:482: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tmps
#  480|   	len = snprintf(NULL, 0, "%d%s", port, wsmand_options_get_use_ssl() ? "s" : "");
#  481|   	tmps = malloc((len+1) * sizeof(char));
#  482|-> 	snprintf(tmps, len+1, "%d%s", port, wsmand_options_get_use_ssl() ? "s" : "");
#  483|   	shttpd_set_option(ctx, "ports", tmps);
#  484|   	free(tmps);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
openwsman-2.8.1/src/server/wsmand-listener.c:482:45: warning[-Wanalyzer-malloc-leak]: leak of ‘tmps’
openwsman-2.8.1/src/server/wsmand-listener.c:473:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/wsmand-listener.c:476:13: branch_false: ...to here
openwsman-2.8.1/src/server/wsmand-listener.c:481:16: acquire_memory: allocated here
openwsman-2.8.1/src/server/wsmand-listener.c:482:45: danger: ‘tmps’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  480|   	len = snprintf(NULL, 0, "%d%s", port, wsmand_options_get_use_ssl() ? "s" : "");
#  481|   	tmps = malloc((len+1) * sizeof(char));
#  482|-> 	snprintf(tmps, len+1, "%d%s", port, wsmand_options_get_use_ssl() ? "s" : "");
#  483|   	shttpd_set_option(ctx, "ports", tmps);
#  484|   	free(tmps);

Error: CPPCHECK_WARNING (CWE-758): [#def182]
openwsman-2.8.1/src/server/wsmand-listener.c:638: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement
#  636|                           return ret;
#  637|                   }
#  638|->         }
#  639|   }
#  640|   

Error: COMPILER_WARNING (CWE-563): [#def183]
openwsman-2.8.1/src/server/wsmand-listener.c:644:13: warning[-Wunused-variable]: unused variable ‘lsn’
#  644 |         int lsn, port, sock;
#      |             ^~~
#  642|   WsManListenerH *wsmand_start_server(dictionary * ini)
#  643|   {
#  644|-> 	int lsn, port, sock;
#  645|   	struct thread       *thread;
#  646|   	pthread_t tid;

Error: COMPILER_WARNING (CWE-563): [#def184]
openwsman-2.8.1/src/server/wsmand-listener.c:644:24: warning[-Wunused-variable]: unused variable ‘sock’
#  644 |         int lsn, port, sock;
#      |                        ^~~~
#  642|   WsManListenerH *wsmand_start_server(dictionary * ini)
#  643|   {
#  644|-> 	int lsn, port, sock;
#  645|   	struct thread       *thread;
#  646|   	pthread_t tid;

Error: COMPILER_WARNING (CWE-563): [#def185]
openwsman-2.8.1/src/server/wsmand-listener.c:645:30: warning[-Wunused-variable]: unused variable ‘thread’
#  645 |         struct thread       *thread;
#      |                              ^~~~~~
#  643|   {
#  644|   	int lsn, port, sock;
#  645|-> 	struct thread       *thread;
#  646|   	pthread_t tid;
#  647|   #ifdef ENABLE_EVENTING_SUPPORT

Error: COMPILER_WARNING (CWE-563): [#def186]
openwsman-2.8.1/src/server/wsmand-listener.c:651:13: warning[-Wunused-variable]: unused variable ‘use_ssl’
#  651 |         int use_ssl = wsmand_options_get_use_ssl();
#      |             ^~~~~~~
#  649|   #endif
#  650|   	pthread_attr_t pattrs;
#  651|-> 	int use_ssl = wsmand_options_get_use_ssl();
#  652|   	struct shttpd_ctx   *httpd_ctx;
#  653|   

Error: COMPILER_WARNING (CWE-563): [#def187]
openwsman-2.8.1/src/server/wsmand-listener.c: scope_hint: In function ‘wsmand_start_server’
openwsman-2.8.1/src/server/wsmand-listener.c:657:13: warning[-Wunused-variable]: unused variable ‘num_threads’
#  657 |         int num_threads = 0;
#      |             ^~~~~~~~~~~
#  655|   	listener->config = ini;
#  656|   	WsContextH cntx = wsman_init_plugins(listener);
#  657|->         int num_threads = 0;
#  658|           int max_threads = wsmand_options_get_max_threads();
#  659|           int max_connections_per_thread = wsmand_options_get_max_connections_per_thread();

Error: GCC_ANALYZER_WARNING (CWE-910): [#def188]
openwsman-2.8.1/src/server/wsmand.c:156:22: warning[-Wanalyzer-fd-use-after-close]: ‘dup’ on closed file descriptor ‘1’
openwsman-2.8.1/src/server/wsmand.c:147:17: release_resource: closed here
openwsman-2.8.1/src/server/wsmand.c:152:17: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/wsmand.c:154:17: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:156:22: danger: ‘dup’ on closed file descriptor ‘1’; ‘close’ was at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  154|   		close(STDERR_FILENO);
#  155|   
#  156|-> 		fd = dup(fd);	/* dup fd to stderr */
#  157|   		assert(fd == STDERR_FILENO);
#  158|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def189]
openwsman-2.8.1/src/server/wsmand.c:172:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
openwsman-2.8.1/src/server/wsmand.c:194:13: enter_function: entry to ‘daemonize’
openwsman-2.8.1/src/server/wsmand.c:203:9: branch_true: following ‘true’ branch (when ‘i == 0’)...
openwsman-2.8.1/src/server/wsmand.c:205:13: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:205:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/wsmand.c:209:19: branch_false: ...to here
openwsman-2.8.1/src/server/wsmand.c:214:12: branch_false: following ‘false’ branch (when ‘fork_rv <= 0’)...
openwsman-2.8.1/src/server/wsmand.c:218:9: branch_false: ...to here
openwsman-2.8.1/src/server/wsmand.c:226:9: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/wsmand.c:230:14: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:232:9: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/wsmand.c:234:14: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:234:14: acquire_resource: opened here
openwsman-2.8.1/src/server/wsmand.c:235:9: branch_true: following ‘true’ branch (when ‘fd == 2’)...
openwsman-2.8.1/src/server/wsmand.c:237:19: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:240:9: call_function: calling ‘rc_write’ from ‘daemonize’
#  170|   		size_t bytes_written;
#  171|   
#  172|-> 		bytes_written = write(fd, ptr, bytes_remaining);
#  173|   
#  174|   		if (bytes_written == -1) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def190]
openwsman-2.8.1/src/server/wsmand.c:237:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
openwsman-2.8.1/src/server/wsmand.c:203:9: branch_true: following ‘true’ branch (when ‘i == 0’)...
openwsman-2.8.1/src/server/wsmand.c:205:13: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:205:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/wsmand.c:209:19: branch_false: ...to here
openwsman-2.8.1/src/server/wsmand.c:214:12: branch_false: following ‘false’ branch (when ‘fork_rv <= 0’)...
openwsman-2.8.1/src/server/wsmand.c:218:9: branch_false: ...to here
openwsman-2.8.1/src/server/wsmand.c:226:9: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/wsmand.c:230:14: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:232:9: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/wsmand.c:234:14: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:234:14: acquire_resource: opened here
openwsman-2.8.1/src/server/wsmand.c:235:9: branch_true: following ‘true’ branch (when ‘fd == 2’)...
openwsman-2.8.1/src/server/wsmand.c:237:19: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:237:14: danger: ‘fd’ leaks here; was opened at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  235|   	assert(fd == STDERR_FILENO);
#  236|   
#  237|-> 	fd = open(wsmand_options_get_pid_file(),
#  238|   		  O_WRONLY | O_CREAT | O_TRUNC, 0644);
#  239|   	pid = u_strdup_printf("%d", getpid());

Error: GCC_ANALYZER_WARNING (CWE-775): [#def191]
openwsman-2.8.1/src/server/wsmand.c:237:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
openwsman-2.8.1/src/server/wsmand.c:203:9: branch_true: following ‘true’ branch (when ‘i == 0’)...
openwsman-2.8.1/src/server/wsmand.c:205:13: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:205:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/wsmand.c:209:19: branch_false: ...to here
openwsman-2.8.1/src/server/wsmand.c:214:12: branch_false: following ‘false’ branch (when ‘fork_rv <= 0’)...
openwsman-2.8.1/src/server/wsmand.c:218:9: branch_false: ...to here
openwsman-2.8.1/src/server/wsmand.c:226:9: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/wsmand.c:230:14: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:232:9: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/wsmand.c:234:14: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:234:14: acquire_resource: opened here
openwsman-2.8.1/src/server/wsmand.c:235:9: branch_true: following ‘true’ branch (when ‘fd == 2’)...
openwsman-2.8.1/src/server/wsmand.c:237:19: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:237:19: danger: ‘fd’ leaks here; was opened at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
#  235|   	assert(fd == STDERR_FILENO);
#  236|   
#  237|-> 	fd = open(wsmand_options_get_pid_file(),
#  238|   		  O_WRONLY | O_CREAT | O_TRUNC, 0644);
#  239|   	pid = u_strdup_printf("%d", getpid());

Error: GCC_ANALYZER_WARNING (CWE-775): [#def192]
openwsman-2.8.1/src/server/wsmand.c:239:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
openwsman-2.8.1/src/server/wsmand.c:203:9: branch_true: following ‘true’ branch (when ‘i == 0’)...
openwsman-2.8.1/src/server/wsmand.c:205:13: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:205:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/wsmand.c:209:19: branch_false: ...to here
openwsman-2.8.1/src/server/wsmand.c:214:12: branch_false: following ‘false’ branch (when ‘fork_rv <= 0’)...
openwsman-2.8.1/src/server/wsmand.c:218:9: branch_false: ...to here
openwsman-2.8.1/src/server/wsmand.c:226:9: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/wsmand.c:230:14: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:232:9: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/wsmand.c:234:14: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:234:14: acquire_resource: opened here
openwsman-2.8.1/src/server/wsmand.c:235:9: branch_true: following ‘true’ branch (when ‘fd == 2’)...
openwsman-2.8.1/src/server/wsmand.c:237:19: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:239:15: danger: ‘fd’ leaks here; was opened at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
#  237|   	fd = open(wsmand_options_get_pid_file(),
#  238|   		  O_WRONLY | O_CREAT | O_TRUNC, 0644);
#  239|-> 	pid = u_strdup_printf("%d", getpid());
#  240|   	rc_write(fd, pid, strlen(pid));
#  241|   	u_free(pid);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def193]
openwsman-2.8.1/src/server/wsmand.c:241:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
openwsman-2.8.1/src/server/wsmand.c:194:13: enter_function: entry to ‘daemonize’
openwsman-2.8.1/src/server/wsmand.c:203:9: branch_true: following ‘true’ branch (when ‘i == 0’)...
openwsman-2.8.1/src/server/wsmand.c:205:13: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:205:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/wsmand.c:209:19: branch_false: ...to here
openwsman-2.8.1/src/server/wsmand.c:214:12: branch_false: following ‘false’ branch (when ‘fork_rv <= 0’)...
openwsman-2.8.1/src/server/wsmand.c:218:9: branch_false: ...to here
openwsman-2.8.1/src/server/wsmand.c:226:9: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/wsmand.c:230:14: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:232:9: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/wsmand.c:234:14: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:234:14: acquire_resource: opened here
openwsman-2.8.1/src/server/wsmand.c:235:9: branch_true: following ‘true’ branch (when ‘fd == 2’)...
openwsman-2.8.1/src/server/wsmand.c:237:19: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:240:9: call_function: calling ‘rc_write’ from ‘daemonize’
openwsman-2.8.1/src/server/wsmand.c:240:9: return_function: returning to ‘daemonize’ from ‘rc_write’
openwsman-2.8.1/src/server/wsmand.c:241:9: danger: ‘fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/11)
#  239|   	pid = u_strdup_printf("%d", getpid());
#  240|   	rc_write(fd, pid, strlen(pid));
#  241|-> 	u_free(pid);
#  242|   	close(fd);
#  243|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def194]
openwsman-2.8.1/src/server/wsmand.c:242:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
openwsman-2.8.1/src/server/wsmand.c:194:13: enter_function: entry to ‘daemonize’
openwsman-2.8.1/src/server/wsmand.c:203:9: branch_true: following ‘true’ branch (when ‘i == 0’)...
openwsman-2.8.1/src/server/wsmand.c:205:13: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:205:12: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/wsmand.c:209:19: branch_false: ...to here
openwsman-2.8.1/src/server/wsmand.c:214:12: branch_false: following ‘false’ branch (when ‘fork_rv <= 0’)...
openwsman-2.8.1/src/server/wsmand.c:218:9: branch_false: ...to here
openwsman-2.8.1/src/server/wsmand.c:226:9: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/wsmand.c:230:14: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:232:9: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/wsmand.c:234:14: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:234:14: acquire_resource: opened here
openwsman-2.8.1/src/server/wsmand.c:235:9: branch_true: following ‘true’ branch (when ‘fd == 2’)...
openwsman-2.8.1/src/server/wsmand.c:237:19: branch_true: ...to here
openwsman-2.8.1/src/server/wsmand.c:240:9: call_function: calling ‘rc_write’ from ‘daemonize’
openwsman-2.8.1/src/server/wsmand.c:240:9: return_function: returning to ‘daemonize’ from ‘rc_write’
openwsman-2.8.1/src/server/wsmand.c:242:9: danger: ‘fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/11)
#  240|   	rc_write(fd, pid, strlen(pid));
#  241|   	u_free(pid);
#  242|-> 	close(fd);
#  243|   
#  244|   	// TODO

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-206.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-gcc-latest-x86_64
project-nameopenwsman-2.8.1-10.fc44
store-results-to/tmp/tmpoxx0zlz3/openwsman-2.8.1-10.fc44.tar.xz
time-created2025-10-28 19:33:15
time-finished2025-10-28 19:36:32
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpoxx0zlz3/openwsman-2.8.1-10.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpoxx0zlz3/openwsman-2.8.1-10.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9