openwsman-2.8.1-11.fc44

List of Findings

Error: SHELLCHECK_WARNING (CWE-563): [#def1]
/etc/openwsman/owsmangencert.sh:6:1: warning[SC2034]: CAFILE appears unused. Verify use (or export if used externally).
#    4|   KEYFILE=/etc/openwsman/serverkey.pem
#    5|   CNFFILE=/etc/openwsman/ssleay.cnf
#    6|-> CAFILE=/etc/openwsman/ca.crt
#    7|   DAYS=365
#    8|   

Error: SHELLCHECK_WARNING (CWE-398): [#def2]
/etc/openwsman/owsmangencert.sh:9:1: warning[SC2113]: 'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.
#    7|   DAYS=365
#    8|   
#    9|-> function create_ssl_cnf
#   10|   {
#   11|       # Get minimum RSA key length at current security level

Error: SHELLCHECK_WARNING (CWE-398): [#def3]
/etc/openwsman/owsmangencert.sh:45:1: warning[SC2112]: 'function' keyword is non-standard. Delete it.
#   43|   }
#   44|   
#   45|-> function selfsign_sscg()
#   46|   {
#   47|       sscg --quiet \

Error: SHELLCHECK_WARNING (CWE-398): [#def4]
/etc/openwsman/owsmangencert.sh:54:1: warning[SC2112]: 'function' keyword is non-standard. Delete it.
#   52|   }
#   53|   
#   54|-> function selfsign_openssl()
#   55|   {
#   56|   

Error: SHELLCHECK_WARNING (CWE-685): [#def5]
/etc/openwsman/owsmangencert.sh:54:1: warning[SC2120]: selfsign_openssl references arguments, but none are ever passed.
#   52|   }
#   53|   
#   54|-> function selfsign_openssl()
#   55|   {
#   56|   

Error: SHELLCHECK_WARNING (CWE-88): [#def6]
/etc/openwsman/owsmangencert.sh:67:29: error[SC2068]: Double quote array expansions to avoid re-splitting elements.
#   65|       # certificate is created
#   66|   
#   67|->     openssl req -days $DAYS $@ -config $CNFFILE \
#   68|           -new -x509 -nodes -out $CERTFILE \
#   69|           -keyout $KEYFILE

Error: SHELLCHECK_WARNING (CWE-477): [#def7]
/etc/openwsman/owsmangencert.sh:73:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   71|   }
#   72|   
#   73|-> if [ "$1" != "--force" -a -f $KEYFILE ]; then
#   74|     echo "$KEYFILE exists!  Use \"$0 --force.\""
#   75|     exit 0

Error: SHELLCHECK_WARNING (CWE-477): [#def8]
/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-1164): [#def9]
openwsman-2.8.1/bindings/ruby/helpers.h:91:1: warning[-Wunused-function]: ‘hash2value’ defined but not used
#   91 | hash2value( hash_t *hash )
#      | ^~~~~~~~~~
#   89|   /* convert openwsman hash_t* to hash VALUE (string pairs) */
#   90|   static VALUE
#   91|-> hash2value( hash_t *hash )
#   92|   {
#   93|       VALUE v;

Error: COMPILER_WARNING (CWE-1164): [#def10]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:2210: included_from: Included from here.
openwsman-2.8.1/bindings/ruby/helpers.h:175:1: warning[-Wunused-function]: ‘value2hash’ defined but not used
#  175 | value2hash( hash_t *h, VALUE v, int valuetype )
#      | ^~~~~~~~~~
#  173|    */
#  174|   static hash_t *
#  175|-> value2hash( hash_t *h, VALUE v, int valuetype )
#  176|   {
#  177|       if (NIL_P(v)) return NULL;

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

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

Error: CPPCHECK_WARNING (CWE-476): [#def13]
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): [#def14]
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): [#def15]
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): [#def16]
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): [#def17]
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): [#def18]
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): [#def19]
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): [#def20]
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): [#def21]
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): [#def22]
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): [#def23]
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): [#def24]
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): [#def25]
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): [#def26]
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): [#def27]
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: CPPCHECK_WARNING (CWE-476): [#def28]
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): [#def29]
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): [#def30]
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: CPPCHECK_WARNING (CWE-476): [#def31]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1661: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: klass_name
# 1659|     size_t klass_len = 4 + strlen(type->name) + 1;
# 1660|     char *klass_name = (char *) malloc(klass_len);
# 1661|->   SWIG_snprintf(klass_name, klass_len, "TYPE%s", type->name);
# 1662|     if (NIL_P(_cSWIG_Pointer)) {
# 1663|       _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);

Error: COMPILER_WARNING (CWE-477): [#def32]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c: scope_hint: In function ‘SWIG_Ruby_NewPointerObj’
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1707:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1707 |     obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
#      |     ^~~
/usr/include/ruby/internal/core.h:27: included_from: Included from here.
/usr/include/ruby/ruby.h:29: included_from: Included from here.
/usr/include/ruby.h:38: included_from: Included from here.
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1008: included_from: Included from here.
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1705|   
# 1706|       /* Create a new Ruby object */
# 1707|->     obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), 
# 1708|   			   ( own ? VOIDFUNC(sklass->destroy) : 
# 1709|   			     (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )

Error: COMPILER_WARNING (CWE-477): [#def33]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1707:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1705|   
# 1706|       /* Create a new Ruby object */
# 1707|->     obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), 
# 1708|   			   ( own ? VOIDFUNC(sklass->destroy) : 
# 1709|   			     (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )

Error: CPPCHECK_WARNING (CWE-476): [#def34]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1719: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: klass_name
# 1717|       size_t klass_len = 4 + strlen(type->name) + 1;
# 1718|       klass_name = (char *) malloc(klass_len);
# 1719|->     SWIG_snprintf(klass_name, klass_len, "TYPE%s", type->name);
# 1720|       klass = rb_const_get(_mSWIG, rb_intern(klass_name));
# 1721|       free((void *) klass_name);

Error: COMPILER_WARNING (CWE-477): [#def35]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1722:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1722 |     obj = Data_Wrap_Struct(klass, 0, 0, ptr);
#      |     ^~~
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1720|       klass = rb_const_get(_mSWIG, rb_intern(klass_name));
# 1721|       free((void *) klass_name);
# 1722|->     obj = Data_Wrap_Struct(klass, 0, 0, ptr);
# 1723|     }
# 1724|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));

Error: COMPILER_WARNING (CWE-477): [#def36]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1722:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1720|       klass = rb_const_get(_mSWIG, rb_intern(klass_name));
# 1721|       free((void *) klass_name);
# 1722|->     obj = Data_Wrap_Struct(klass, 0, 0, ptr);
# 1723|     }
# 1724|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));

Error: COMPILER_WARNING (CWE-477): [#def37]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c: scope_hint: In function ‘SWIG_Ruby_NewClassInstance’
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1735:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1735 |   obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
#      |   ^~~
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1733|     VALUE obj;
# 1734|     swig_class *sklass = (swig_class *) type->clientdata;
# 1735|->   obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
# 1736|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
# 1737|     return obj;

Error: COMPILER_WARNING (CWE-477): [#def38]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1735:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1733|     VALUE obj;
# 1734|     swig_class *sklass = (swig_class *) type->clientdata;
# 1735|->   obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
# 1736|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
# 1737|     return obj;

Error: COMPILER_WARNING (CWE-477): [#def39]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c: scope_hint: In function ‘SWIG_Ruby_ConvertPtrAndOwn’
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1783:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1783 |     Data_Get_Struct(obj, void, vptr);
#      |     ^~~~~~~~~~~~~~~
/usr/include/ruby/internal/core/rdata.h:325:1: note: declared here
#  325 | rb_data_object_get_warning(VALUE obj)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
# 1781|         return SWIG_ERROR;
# 1782|       }
# 1783|->     Data_Get_Struct(obj, void, vptr);
# 1784|     }
# 1785|     

Error: COMPILER_WARNING (CWE-477): [#def40]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1783:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1781|         return SWIG_ERROR;
# 1782|       }
# 1783|->     Data_Get_Struct(obj, void, vptr);
# 1784|     }
# 1785|     

Error: COMPILER_WARNING (CWE-477): [#def41]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c: scope_hint: In function ‘SWIG_Ruby_GetModule’
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1919:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1919 |     Data_Get_Struct(pointer, swig_module_info, ret);
#      |     ^~~~~~~~~~~~~~~
/usr/include/ruby/internal/core/rdata.h:325:1: note: declared here
#  325 | rb_data_object_get_warning(VALUE obj)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
# 1917|     pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
# 1918|     if (pointer != Qnil) {
# 1919|->     Data_Get_Struct(pointer, swig_module_info, ret);
# 1920|     }
# 1921|   

Error: COMPILER_WARNING (CWE-477): [#def42]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1919:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1917|     pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
# 1918|     if (pointer != Qnil) {
# 1919|->     Data_Get_Struct(pointer, swig_module_info, ret);
# 1920|     }
# 1921|   

Error: COMPILER_WARNING (CWE-477): [#def43]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c: scope_hint: In function ‘SWIG_Ruby_SetModule’
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1934:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1934 |   swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
#      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1932|     rb_undef_alloc_func(cl);
# 1933|     /* create and store the structure pointer to a global variable */
# 1934|->   swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
# 1935|     rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
# 1936|   }

Error: COMPILER_WARNING (CWE-477): [#def44]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:1934:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1932|     rb_undef_alloc_func(cl);
# 1933|     /* create and store the structure pointer to a global variable */
# 1934|->   swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
# 1935|     rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
# 1936|   }

Error: CPPCHECK_WARNING (CWE-457): [#def45]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:2710: error[uninitvar]: Uninitialized variable: v
# 2708|       a[1] = (VALUE)(&v);
# 2709|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 2710|->       if (val) *val = v;
# 2711|         return SWIG_OK;
# 2712|       }

Error: CPPCHECK_WARNING (CWE-476): [#def46]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:3008: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: resultProp
# 3006|         resultProp = (char **)calloc(RARRAY_LEN(resultProp_v), sizeof(char *));
# 3007|         for (i = 0; i < RARRAY_LEN(resultProp_v); ++i) {
# 3008|->         resultProp[i] = (char *)as_string(rb_ary_entry(resultProp_v, i));
# 3009|           ++propNum;
# 3010|         }

Error: CPPCHECK_WARNING (CWE-457): [#def47]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:3118: error[uninitvar]: Uninitialized variable: v
# 3116|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 3117|           return SWIG_OverflowError;
# 3118|->       if (val) *val = v;
# 3119|         return SWIG_OK;
# 3120|       }

Error: CPPCHECK_WARNING (CWE-476): [#def48]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:3179: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 3177|         s->fault_code = code;
# 3178|       if (msg)
# 3179|->       s->fault_msg = strdup(msg);
# 3180|       if (detail < 0
# 3181|           || detail > OWSMAN_SYSTEM_ERROR) {

Error: CPPCHECK_WARNING (CWE-457): [#def49]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:3603: error[uninitvar]: Uninitialized variable: v
# 3601|       a[1] = (VALUE)(&v);
# 3602|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2DBL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 3603|->       if (val) *val = v;
# 3604|         return SWIG_OK;
# 3605|       }

Error: CPPCHECK_WARNING (CWE-457): [#def50]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:3845: error[uninitvar]: Uninitialized variable: v
# 3843|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 3844|           return SWIG_OverflowError;
# 3845|->       if (val) *val = v;
# 3846|         return SWIG_OK;
# 3847|       }

Error: CPPCHECK_WARNING (CWE-457): [#def51]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:9968: error[legacyUninitvar]: Uninitialized variable: arg1
# 9966|       }
# 9967|     }
# 9968|->   result = (char *)wsmc_transport_get_auth_name(arg1);
# 9969|     vresult = SWIG_FromCharPtr((const char *)result);
# 9970|     return vresult;

Error: CPPCHECK_WARNING (CWE-457): [#def52]
openwsman-2.8.1/build/bindings/ruby/openwsman_wrap.c:10022: error[legacyUninitvar]: Uninitialized variable: arg1
#10020|       }
#10021|     }
#10022|->   result = (char *)wsman_transport_get_last_error_string(arg1);
#10023|     vresult = SWIG_FromCharPtr((const char *)result);
#10024|     return vresult;

Error: CPPCHECK_WARNING (CWE-476): [#def53]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1661: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: klass_name
# 1659|     size_t klass_len = 4 + strlen(type->name) + 1;
# 1660|     char *klass_name = (char *) malloc(klass_len);
# 1661|->   SWIG_snprintf(klass_name, klass_len, "TYPE%s", type->name);
# 1662|     if (NIL_P(_cSWIG_Pointer)) {
# 1663|       _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1685:7: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 4)’
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12003:1: enter_function: entry to ‘_wrap_wsmc_transport_get_auth_value’
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12010:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12013:10: branch_false: ...to here
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12013:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_wsmc_transport_get_auth_value’
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12013:10: return_function: returning to ‘_wrap_wsmc_transport_get_auth_value’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12014:6: branch_false: following ‘false’ branch...
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12017:3: branch_false: ...to here
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12019:13: acquire_memory: allocated here
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12019:13: call_function: calling ‘SWIG_Ruby_NewPointerObj’ from ‘_wrap_wsmc_transport_get_auth_value’
# 1683|   
# 1684|     assert(type);
# 1685|->   if (type->clientdata) {
# 1686|       sklass = (swig_class *) type->clientdata;
# 1687|   		

Error: COMPILER_WARNING (CWE-477): [#def55]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c: scope_hint: In function ‘SWIG_Ruby_NewPointerObj’
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1707:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1707 |     obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
#      |     ^~~
/usr/include/ruby/internal/core.h:27: included_from: Included from here.
/usr/include/ruby/ruby.h:29: included_from: Included from here.
/usr/include/ruby.h:38: included_from: Included from here.
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1008: included_from: Included from here.
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1705|   
# 1706|       /* Create a new Ruby object */
# 1707|->     obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), 
# 1708|   			   ( own ? VOIDFUNC(sklass->destroy) : 
# 1709|   			     (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )

Error: COMPILER_WARNING (CWE-477): [#def56]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1707:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1705|   
# 1706|       /* Create a new Ruby object */
# 1707|->     obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), 
# 1708|   			   ( own ? VOIDFUNC(sklass->destroy) : 
# 1709|   			     (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )

Error: CPPCHECK_WARNING (CWE-476): [#def57]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1719: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: klass_name
# 1717|       size_t klass_len = 4 + strlen(type->name) + 1;
# 1718|       klass_name = (char *) malloc(klass_len);
# 1719|->     SWIG_snprintf(klass_name, klass_len, "TYPE%s", type->name);
# 1720|       klass = rb_const_get(_mSWIG, rb_intern(klass_name));
# 1721|       free((void *) klass_name);

Error: COMPILER_WARNING (CWE-477): [#def58]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1722:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1722 |     obj = Data_Wrap_Struct(klass, 0, 0, ptr);
#      |     ^~~
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1720|       klass = rb_const_get(_mSWIG, rb_intern(klass_name));
# 1721|       free((void *) klass_name);
# 1722|->     obj = Data_Wrap_Struct(klass, 0, 0, ptr);
# 1723|     }
# 1724|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));

Error: COMPILER_WARNING (CWE-477): [#def59]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1722:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1720|       klass = rb_const_get(_mSWIG, rb_intern(klass_name));
# 1721|       free((void *) klass_name);
# 1722|->     obj = Data_Wrap_Struct(klass, 0, 0, ptr);
# 1723|     }
# 1724|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));

Error: COMPILER_WARNING (CWE-477): [#def60]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c: scope_hint: In function ‘SWIG_Ruby_NewClassInstance’
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1735:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1735 |   obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
#      |   ^~~
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1733|     VALUE obj;
# 1734|     swig_class *sklass = (swig_class *) type->clientdata;
# 1735|->   obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
# 1736|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
# 1737|     return obj;

Error: COMPILER_WARNING (CWE-477): [#def61]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1735:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1733|     VALUE obj;
# 1734|     swig_class *sklass = (swig_class *) type->clientdata;
# 1735|->   obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
# 1736|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
# 1737|     return obj;

Error: COMPILER_WARNING (CWE-477): [#def62]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c: scope_hint: In function ‘SWIG_Ruby_ConvertPtrAndOwn’
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1783:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1783 |     Data_Get_Struct(obj, void, vptr);
#      |     ^~~~~~~~~~~~~~~
/usr/include/ruby/internal/core/rdata.h:325:1: note: declared here
#  325 | rb_data_object_get_warning(VALUE obj)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
# 1781|         return SWIG_ERROR;
# 1782|       }
# 1783|->     Data_Get_Struct(obj, void, vptr);
# 1784|     }
# 1785|     

Error: COMPILER_WARNING (CWE-477): [#def63]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1783:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1781|         return SWIG_ERROR;
# 1782|       }
# 1783|->     Data_Get_Struct(obj, void, vptr);
# 1784|     }
# 1785|     

Error: COMPILER_WARNING (CWE-477): [#def64]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c: scope_hint: In function ‘SWIG_Ruby_GetModule’
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1919:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1919 |     Data_Get_Struct(pointer, swig_module_info, ret);
#      |     ^~~~~~~~~~~~~~~
/usr/include/ruby/internal/core/rdata.h:325:1: note: declared here
#  325 | rb_data_object_get_warning(VALUE obj)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
# 1917|     pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
# 1918|     if (pointer != Qnil) {
# 1919|->     Data_Get_Struct(pointer, swig_module_info, ret);
# 1920|     }
# 1921|   

Error: COMPILER_WARNING (CWE-477): [#def65]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1919:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1917|     pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
# 1918|     if (pointer != Qnil) {
# 1919|->     Data_Get_Struct(pointer, swig_module_info, ret);
# 1920|     }
# 1921|   

Error: COMPILER_WARNING (CWE-477): [#def66]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c: scope_hint: In function ‘SWIG_Ruby_SetModule’
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1934:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1934 |   swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
#      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1932|     rb_undef_alloc_func(cl);
# 1933|     /* create and store the structure pointer to a global variable */
# 1934|->   swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
# 1935|     rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
# 1936|   }

Error: COMPILER_WARNING (CWE-477): [#def67]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:1934:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1932|     rb_undef_alloc_func(cl);
# 1933|     /* create and store the structure pointer to a global variable */
# 1934|->   swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
# 1935|     rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
# 1936|   }

Error: CPPCHECK_WARNING (CWE-457): [#def68]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:2442: error[uninitvar]: Uninitialized variable: v
# 2440|       a[1] = (VALUE)(&v);
# 2441|       if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
# 2442|->       if (val) *val = v;
# 2443|         return SWIG_OK;
# 2444|       }

Error: CPPCHECK_WARNING (CWE-457): [#def69]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:2665: error[uninitvar]: Uninitialized variable: v
# 2663|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 2664|           return SWIG_OverflowError;
# 2665|->       if (val) *val = v;
# 2666|         return SWIG_OK;
# 2667|       }

Error: CPPCHECK_WARNING (CWE-476): [#def70]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:2726: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
# 2724|         s->fault_code = code;
# 2725|       if (msg)
# 2726|->       s->fault_msg = strdup(msg);
# 2727|       if (detail < 0
# 2728|           || detail > OWSMAN_SYSTEM_ERROR) {

Error: CPPCHECK_WARNING (CWE-476): [#def71]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:2844: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: resultProp
# 2842|         resultProp = (char **)calloc(RARRAY_LEN(resultProp_v), sizeof(char *));
# 2843|         for (i = 0; i < RARRAY_LEN(resultProp_v); ++i) {
# 2844|->         resultProp[i] = (char *)as_string(rb_ary_entry(resultProp_v, i));
# 2845|           ++propNum;
# 2846|         }

Error: CPPCHECK_WARNING (CWE-457): [#def72]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:3019: error[uninitvar]: Uninitialized variable: v
# 3017|         if (rb_funcall(obj, swig_lowerthan_id, 1, INT2FIX(0)) != Qfalse)
# 3018|           return SWIG_OverflowError;
# 3019|->       if (val) *val = v;
# 3020|         return SWIG_OK;
# 3021|       }

Error: CPPCHECK_WARNING (CWE-457): [#def73]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:11985: error[legacyUninitvar]: Uninitialized variable: arg1
#11983|       }
#11984|     }
#11985|->   result = (char *)wsmc_transport_get_auth_name(arg1);
#11986|     vresult = SWIG_FromCharPtr((const char *)result);
#11987|     return vresult;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def74]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12019:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 4)’
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12003:1: enter_function: entry to ‘_wrap_wsmc_transport_get_auth_value’
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12010:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12013:10: branch_false: ...to here
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12013:10: call_function: calling ‘SWIG_Ruby_ConvertPtrAndOwn’ from ‘_wrap_wsmc_transport_get_auth_value’
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12013:10: return_function: returning to ‘_wrap_wsmc_transport_get_auth_value’ from ‘SWIG_Ruby_ConvertPtrAndOwn’
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12014:6: branch_false: following ‘false’ branch...
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12017:3: branch_false: ...to here
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12019:13: acquire_memory: this call could return NULL
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12019:13: danger: ‘calloc(1, 4)’ could be NULL: unchecked value from [(13)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/12)
#12017|     arg1 = (WsManClient *)(argp1);
#12018|     result = wsmc_transport_get_auth_value(arg1);
#12019|->   vresult = SWIG_NewPointerObj((wsman_auth_type_t *)memcpy((wsman_auth_type_t *)calloc(1,sizeof(wsman_auth_type_t)),&result,sizeof(wsman_auth_type_t)), SWIGTYPE_p_wsman_auth_type_t, SWIG_POINTER_OWN |  0 );
#12020|     return vresult;
#12021|   fail:

Error: CPPCHECK_WARNING (CWE-457): [#def75]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:12057: error[legacyUninitvar]: Uninitialized variable: arg1
#12055|       }
#12056|     }
#12057|->   result = (char *)wsman_transport_get_last_error_string(arg1);
#12058|     vresult = SWIG_FromCharPtr((const char *)result);
#12059|     return vresult;

Error: COMPILER_WARNING (CWE-477): [#def76]
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c: scope_hint: In function ‘SWIG_Ruby_NewPointerObj’
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c:1707:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1707 |     obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
#      |     ^~~
/usr/include/ruby/internal/core.h:27: included_from: Included from here.
/usr/include/ruby/ruby.h:29: included_from: Included from here.
/usr/include/ruby.h:38: included_from: Included from here.
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c:1008: included_from: Included from here.
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1705|   
# 1706|       /* Create a new Ruby object */
# 1707|->     obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), 
# 1708|   			   ( own ? VOIDFUNC(sklass->destroy) : 
# 1709|   			     (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )

Error: COMPILER_WARNING (CWE-477): [#def77]
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c:1707:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1705|   
# 1706|       /* Create a new Ruby object */
# 1707|->     obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), 
# 1708|   			   ( own ? VOIDFUNC(sklass->destroy) : 
# 1709|   			     (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )

Error: COMPILER_WARNING (CWE-477): [#def78]
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c:1722:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1722 |     obj = Data_Wrap_Struct(klass, 0, 0, ptr);
#      |     ^~~
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1720|       klass = rb_const_get(_mSWIG, rb_intern(klass_name));
# 1721|       free((void *) klass_name);
# 1722|->     obj = Data_Wrap_Struct(klass, 0, 0, ptr);
# 1723|     }
# 1724|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));

Error: COMPILER_WARNING (CWE-477): [#def79]
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c:1722:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1720|       klass = rb_const_get(_mSWIG, rb_intern(klass_name));
# 1721|       free((void *) klass_name);
# 1722|->     obj = Data_Wrap_Struct(klass, 0, 0, ptr);
# 1723|     }
# 1724|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));

Error: COMPILER_WARNING (CWE-477): [#def80]
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c: scope_hint: In function ‘SWIG_Ruby_NewClassInstance’
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c:1735:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1735 |   obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
#      |   ^~~
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1733|     VALUE obj;
# 1734|     swig_class *sklass = (swig_class *) type->clientdata;
# 1735|->   obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
# 1736|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
# 1737|     return obj;

Error: COMPILER_WARNING (CWE-477): [#def81]
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c:1735:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1733|     VALUE obj;
# 1734|     swig_class *sklass = (swig_class *) type->clientdata;
# 1735|->   obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
# 1736|     rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
# 1737|     return obj;

Error: COMPILER_WARNING (CWE-477): [#def82]
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c: scope_hint: In function ‘SWIG_Ruby_ConvertPtrAndOwn’
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c:1783:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1783 |     Data_Get_Struct(obj, void, vptr);
#      |     ^~~~~~~~~~~~~~~
/usr/include/ruby/internal/core/rdata.h:325:1: note: declared here
#  325 | rb_data_object_get_warning(VALUE obj)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
# 1781|         return SWIG_ERROR;
# 1782|       }
# 1783|->     Data_Get_Struct(obj, void, vptr);
# 1784|     }
# 1785|     

Error: COMPILER_WARNING (CWE-477): [#def83]
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c:1783:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1781|         return SWIG_ERROR;
# 1782|       }
# 1783|->     Data_Get_Struct(obj, void, vptr);
# 1784|     }
# 1785|     

Error: COMPILER_WARNING (CWE-477): [#def84]
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c: scope_hint: In function ‘SWIG_Ruby_GetModule’
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c:1919:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1919 |     Data_Get_Struct(pointer, swig_module_info, ret);
#      |     ^~~~~~~~~~~~~~~
/usr/include/ruby/internal/core/rdata.h:325:1: note: declared here
#  325 | rb_data_object_get_warning(VALUE obj)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
# 1917|     pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
# 1918|     if (pointer != Qnil) {
# 1919|->     Data_Get_Struct(pointer, swig_module_info, ret);
# 1920|     }
# 1921|   

Error: COMPILER_WARNING (CWE-477): [#def85]
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c:1919:5: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData
# 1917|     pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
# 1918|     if (pointer != Qnil) {
# 1919|->     Data_Get_Struct(pointer, swig_module_info, ret);
# 1920|     }
# 1921|   

Error: COMPILER_WARNING (CWE-477): [#def86]
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c: scope_hint: In function ‘SWIG_Ruby_SetModule’
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c:1934:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1934 |   swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
#      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ruby/internal/core/rdata.h:293:1: note: declared here
#  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1932|     rb_undef_alloc_func(cl);
# 1933|     /* create and store the structure pointer to a global variable */
# 1934|->   swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
# 1935|     rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
# 1936|   }

Error: COMPILER_WARNING (CWE-477): [#def87]
openwsman-2.8.1/build/usr/share/gems/gems/openwsman-2.8.1/ext/openwsman/openwsman_wrap.c:1934:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData
# 1932|     rb_undef_alloc_func(cl);
# 1933|     /* create and store the structure pointer to a global variable */
# 1934|->   swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
# 1935|     rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
# 1936|   }

Error: COMPILER_WARNING (CWE-563): [#def88]
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): [#def89]
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): [#def90]
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): [#def91]
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): [#def92]
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): [#def93]
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): [#def94]
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): [#def95]
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): [#def96]
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): [#def97]
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: [#def98]
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): [#def99]
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): [#def100]
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): [#def101]
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...
openwsman-2.8.1/src/authenticators/file/file_auth.c:111:12: 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: throw: if ‘debug_full’ throws an exception...
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): [#def102]
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...
openwsman-2.8.1/src/authenticators/file/file_auth.c:111:12: 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: throw: if ‘debug_full’ throws an exception...
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): [#def103]
openwsman-2.8.1/src/authenticators/file/file_auth.c:122:20: 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...
openwsman-2.8.1/src/authenticators/file/file_auth.c:111:12: 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: throw: if ‘debug_full’ throws an exception...
openwsman-2.8.1/src/authenticators/file/file_auth.c:122:20: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  120|                   debug( "user: %s,  passwd: XXXX", u);
#  121|                   min_len = strlen(u);
#  122|->                 if (username_l < min_len) {
#  123|                     min_len = username_l;
#  124|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
openwsman-2.8.1/src/authenticators/file/file_auth.c:122:20: 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...
openwsman-2.8.1/src/authenticators/file/file_auth.c:111:12: 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: throw: if ‘debug_full’ throws an exception...
openwsman-2.8.1/src/authenticators/file/file_auth.c:122:20: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  120|                   debug( "user: %s,  passwd: XXXX", u);
#  121|                   min_len = strlen(u);
#  122|->                 if (username_l < min_len) {
#  123|                     min_len = username_l;
#  124|                   }

Error: CPPCHECK_WARNING (CWE-476): [#def105]
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-476): [#def106]
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): [#def107]
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: throw: if ‘u_strdup_vprintf’ throws an exception...
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): [#def108]
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: throw: if ‘u_strdup_vprintf’ throws an exception...
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-688): [#def109]
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’
#  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-476): [#def110]
openwsman-2.8.1/src/lib/u/iniparser.c:188:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘key’
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’
#  186|       len = strlen(key);
#  187|       for (hash=0, i=0 ; i<len ; i++) {
#  188|->         hash += (unsigned)key[i] ;
#  189|           hash += (hash<<10);
#  190|           hash ^= (hash>>6) ;

Error: GCC_ANALYZER_WARNING (CWE-126): [#def111]
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...
openwsman-2.8.1/src/lib/u/iniparser.c:917:8: 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): [#def112]
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): [#def113]
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: throw: if ‘vsyslog’ throws an exception...
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): [#def114]
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: throw: if ‘u_strdup_vprintf’ throws an exception...
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): [#def115]
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...
openwsman-2.8.1/src/lib/u/uoption.c:703:12: branch_false: ...to here
openwsman-2.8.1/src/lib/u/uoption.c:707:21: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/lib/u/uoption.c:716:41: 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...
openwsman-2.8.1/src/lib/u/uoption.c:717:12: 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): [#def116]
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): [#def117]
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): [#def118]
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): [#def119]
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): [#def120]
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): [#def121]
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): [#def122]
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): [#def123]
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): [#def124]
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: COMPILER_WARNING (CWE-704): [#def125]
openwsman-2.8.1/src/lib/wsman-epr.c: scope_hint: In function ‘epr_from_string’
openwsman-2.8.1/src/lib/wsman-epr.c:183:11: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  183 |         p = strchr(str, '?');
#      |           ^
#  181|   	epr_t *epr = NULL;
#  182|   
#  183|-> 	p = strchr(str, '?');
#  184|   	if (p) {
#  185|   		uri = u_strndup(str, p - str);

Error: COMPILER_WARNING (CWE-704): [#def126]
openwsman-2.8.1/src/lib/wsman-epr.c:183:11: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  181|   	epr_t *epr = NULL;
#  182|   
#  183|-> 	p = strchr(str, '?');
#  184|   	if (p) {
#  185|   		uri = u_strndup(str, p - str);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def127]
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: throw: if ‘u_strdup_vprintf’ throws an exception...
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): [#def128]
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: [#def129]
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: GCC_ANALYZER_WARNING (CWE-476): [#def130]
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): [#def131]
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:1981:11: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/lib/wsman-soap.c:1982:17: branch_true: ...to here
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): [#def132]
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): [#def133]
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): [#def134]
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: throw: if ‘u_free’ throws an exception...
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): [#def135]
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: throw: if ‘u_free’ throws an exception...
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): [#def136]
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: throw: if ‘debug_full’ throws an exception...
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): [#def137]
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: throw: if ‘debug_full’ throws an exception...
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): [#def138]
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: throw: if ‘debug_full’ throws an exception...
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): [#def139]
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: throw: if ‘debug_full’ throws an exception...
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): [#def140]
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: throw: if ‘u_realloc’ throws an exception...
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): [#def141]
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: throw: if ‘u_realloc’ throws an exception...
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): [#def142]
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: throw: if ‘u_free’ throws an exception...
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/12/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): [#def143]
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: throw: if ‘u_free’ throws an exception...
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/13/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): [#def144]
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...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:166:12: 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:29: 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:175:75: branch_false: ...to here
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: throw: if ‘u_free’ throws an exception...
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/14/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): [#def145]
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...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:166:12: 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:29: 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:175:75: branch_false: ...to here
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: throw: if ‘u_free’ throws an exception...
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/15/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): [#def146]
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...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:166:12: 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:29: 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:175:75: branch_false: ...to here
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: throw: if ‘u_realloc’ throws an exception...
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/16/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): [#def147]
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...
openwsman-2.8.1/src/lib/wsman-subscription-repository.c:166:12: 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:29: 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:175:75: branch_false: ...to here
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: throw: if ‘u_realloc’ throws an exception...
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/17/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-688): [#def148]
openwsman-2.8.1/src/lib/wsman-xml.c:806:38: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
openwsman-2.8.1/src/lib/wsman-xml.c:795:5: enter_function: entry to ‘ws_xml_is_node_qname’
openwsman-2.8.1/src/lib/wsman-xml.c:806:20: branch_false: following ‘false’ branch (when ‘name’ is non-NULL)...
openwsman-2.8.1/src/lib/wsman-xml.c:806:51: branch_false: ...to here
openwsman-2.8.1/src/lib/wsman-xml.c:806:51: call_function: calling ‘ws_xml_get_node_local_name’ from ‘ws_xml_is_node_qname’
openwsman-2.8.1/src/lib/wsman-xml.c:806:51: return_function: returning to ‘ws_xml_is_node_qname’ from ‘ws_xml_get_node_local_name’
openwsman-2.8.1/src/lib/wsman-xml.c:806:38: danger: argument 2 (‘ws_xml_get_node_local_name(node)’) NULL where non-null expected
#  804|   	    || (nsUri == nodeNsUri)
#  805|   	    || (nsUri != NULL && nodeNsUri != NULL && !strcmp(nodeNsUri, nsUri))) {
#  806|-> 		if (name == NULL || !strcmp(name, ws_xml_get_node_local_name(node)))
#  807|   			retVal = 1;
#  808|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def149]
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’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1805:12: 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): [#def150]
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’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1805:12: 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): [#def151]
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’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1805:12: 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): [#def152]
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’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1805:12: 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): [#def153]
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:1265:1: enter_function: entry to ‘cim_getElementAt’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1289:12: branch_true: following ‘true’ branch (when ‘retval != 0’)...
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1290:17: branch_true: ...to here
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1290:17: call_function: calling ‘instance2xml’ from ‘cim_getElementAt’
#  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: [#def154]
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c: scope_hint: In function ‘instance2xml’
openwsman-2.8.1/src/plugins/cim/sfcc-interface.c:1012:19: warning[-Wunused-but-set-variable=]: variable ‘ttime’ set but not used
# 1012 |         long long ttime = 0;
#      |                   ^~~~~
# 1010|   	struct timeval tv0, tv1;
# 1011|   	long long t0, t1;
# 1012|-> 	long long ttime = 0;
# 1013|   	gettimeofday(&tv0, NULL);
# 1014|   

Error: COMPILER_WARNING (CWE-563): [#def155]
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): [#def156]
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): [#def157]
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): [#def158]
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): [#def159]
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): [#def160]
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): [#def161]
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): [#def162]
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): [#def163]
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): [#def164]
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): [#def165]
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): [#def166]
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): [#def167]
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): [#def168]
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): [#def169]
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): [#def170]
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): [#def171]
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): [#def172]
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): [#def173]
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): [#def174]
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: [#def175]
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: [#def176]
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): [#def177]
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): [#def178]
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): [#def179]
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): [#def180]
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: [#def181]
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): [#def182]
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: [#def183]
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: [#def184]
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: [#def185]
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: [#def186]
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: COMPILER_WARNING (CWE-1164): [#def187]
openwsman-2.8.1/src/plugins/swig/src/swig-plugin.c:78:1: warning[-Wunused-function]: ‘string2target’ defined but not used
#   78 | string2target(const char *s)
#      | ^~~~~~~~~~~~~
#   76|   
#   77|   static Target_Type
#   78|-> string2target(const char *s)
#   79|   {
#   80|       Target_Type obj;

Error: COMPILER_WARNING (CWE-1164): [#def188]
openwsman-2.8.1/src/plugins/swig/src/swig-plugin.c:99:1: warning[-Wunused-function]: ‘proplist2target’ defined but not used
#   99 | proplist2target(const char** cplist)
#      | ^~~~~~~~~~~~~~~
#   97|   
#   98|   static Target_Type
#   99|-> proplist2target(const char** cplist)
#  100|   {
#  101|       Target_Type pl;

Error: COMPILER_WARNING (CWE-563): [#def189]
openwsman-2.8.1/src/plugins/swig/src/swig-plugin.c:168:12: warning[-Wunused-variable]: ‘_PLUGIN_COUNT’ defined but not used
#  168 | static int _PLUGIN_COUNT = 0;    /* use count, number of plugins */
#      |            ^~~~~~~~~~~~~
#  166|   static int _TARGET_INIT = 0; /* acts as a boolean - is target initialized? */
#  167|   #endif
#  168|-> static int _PLUGIN_COUNT = 0;    /* use count, number of plugins */
#  169|   static pthread_mutex_t _PLUGIN_INIT_MUTEX = PTHREAD_MUTEX_INITIALIZER;  /* mutex around _PLUGIN_COUNT */
#  170|   static Target_Type _TARGET_MODULE = Target_Null;  /* The target module (aka namespace) */

Error: COMPILER_WARNING (CWE-1164): [#def190]
openwsman-2.8.1/build/src/plugins/swig/ruby/swig_wrap.c:2223: included_from: Included from here.
openwsman-2.8.1/src/plugins/swig/src/swig-plugin.c: scope_hint: At top level
openwsman-2.8.1/src/plugins/swig/src/swig-plugin.c:350:1: warning[-Wunused-function]: ‘Swig_SubscriptionCancel_EP’ defined but not used
#  350 | Swig_SubscriptionCancel_EP(WsEventThreadContextH cntx)
#      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
#  348|   
#  349|   static int
#  350|-> Swig_SubscriptionCancel_EP(WsEventThreadContextH cntx)
#  351|   {
#  352|       WsmanStatus status;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def191]
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): [#def192]
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): [#def193]
openwsman-2.8.1/src/server/shttpd/auth.c:50:25: 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’
#   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): [#def194]
openwsman-2.8.1/src/server/shttpd/auth.c:50:25: 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’
#   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): [#def195]
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): [#def196]
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): [#def197]
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): [#def198]
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: COMPILER_WARNING (CWE-1164): [#def199]
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): [#def200]
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: throw: if ‘_shttpd_elog’ throws an exception...
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/8/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): [#def201]
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: throw: if ‘_shttpd_elog’ throws an exception...
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/9/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-775): [#def202]
openwsman-2.8.1/src/server/shttpd/auth.c:443: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’
#  441|   
#  442|   	p.ptr = pass;
#  443|-> 	p.len = strlen(pass);
#  444|   
#  445|   	/* Copy the stuff to temporary file */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def203]
openwsman-2.8.1/src/server/shttpd/auth.c:443: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’
#  441|   
#  442|   	p.ptr = pass;
#  443|-> 	p.len = strlen(pass);
#  444|   
#  445|   	/* Copy the stuff to temporary file */

Error: GCC_ANALYZER_WARNING (CWE-688): [#def204]
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): [#def205]
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-401): [#def206]
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: throw: if ‘_shttpd_strdup’ throws an exception...
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): [#def207]
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): [#def208]
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): [#def209]
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): [#def210]
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): [#def211]
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): [#def212]
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): [#def213]
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): [#def214]
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): [#def215]
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:1678:1: enter_function: entry to ‘worker_function’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1682:16: branch_true: following ‘true’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1683:17: branch_true: ...to here
openwsman-2.8.1/src/server/shttpd/shttpd.c:1683:17: call_function: calling ‘poll_worker’ from ‘worker_function’
#  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): [#def216]
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): [#def217]
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): [#def218]
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): [#def219]
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): [#def220]
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): [#def221]
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): [#def222]
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): [#def223]
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): [#def224]
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): [#def225]
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): [#def226]
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): [#def227]
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-476): [#def228]
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): [#def229]
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): [#def230]
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:12: 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:1905:19: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1910:26: 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: throw: if ‘_shttpd_elog’ throws an exception...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: danger: ‘fopen(config_file, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
# 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): [#def231]
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:12: 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:1905:19: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1910:26: 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: throw: if ‘_shttpd_elog’ throws an exception...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1926:17: danger: ‘fopen(config_file, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
# 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): [#def232]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1934:29: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(config_file, "r")’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1902:12: 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:1905:19: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1910:26: 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:1938:33: throw: if ‘_shttpd_elog’ throws an exception...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1934:29: danger: ‘fopen(config_file, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/4)
# 1932|   
# 1933|   			/* Ignore empty lines and comments */
# 1934|-> 			if (line[0] == '#' || line[0] == '\n')
# 1935|   				continue;
# 1936|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def233]
openwsman-2.8.1/src/server/shttpd/shttpd.c:1934:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(config_file, "r")’
openwsman-2.8.1/src/server/shttpd/shttpd.c:1902:12: 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:1905:19: branch_false: following ‘false’ branch...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1910:26: 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:1938:33: throw: if ‘_shttpd_elog’ throws an exception...
openwsman-2.8.1/src/server/shttpd/shttpd.c:1934:29: danger: ‘fopen(config_file, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
# 1932|   
# 1933|   			/* Ignore empty lines and comments */
# 1934|-> 			if (line[0] == '#' || line[0] == '\n')
# 1935|   				continue;
# 1936|   

Error: COMPILER_WARNING: [#def234]
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): [#def235]
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: throw: if ‘_shttpd_strdup’ throws an exception...
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): [#def236]
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: COMPILER_WARNING (CWE-704): [#def237]
openwsman-2.8.1/src/server/wsmand-listener.c: scope_hint: In function ‘get_request_encoding’
openwsman-2.8.1/src/server/wsmand-listener.c:132:24: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  132 |                 if(( p = strstr(content_type, "charset")) != NULL ) {
#      |                        ^
#  130|   	content_type = shttpd_get_header(arg, "Content-Type");
#  131|   	if(content_type ) {
#  132|-> 		if(( p = strstr(content_type, "charset")) != NULL ) {
#  133|   			p += strlen("charset");
#  134|   			p++;

Error: COMPILER_WARNING (CWE-704): [#def238]
openwsman-2.8.1/src/server/wsmand-listener.c:132:24: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  130|   	content_type = shttpd_get_header(arg, "Content-Type");
#  131|   	if(content_type ) {
#  132|-> 		if(( p = strstr(content_type, "charset")) != NULL ) {
#  133|   			p += strlen("charset");
#  134|   			p++;

Error: CPPCHECK_WARNING (CWE-476): [#def239]
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): [#def240]
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): [#def241]
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: throw: if ‘wsmand_options_get_use_ssl’ throws an exception...
openwsman-2.8.1/src/server/wsmand-listener.c:482:45: danger: ‘tmps’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/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): [#def242]
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): [#def243]
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): [#def244]
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): [#def245]
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): [#def246]
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): [#def247]
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): [#def248]
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): [#def249]
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): [#def250]
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: throw: if ‘open’ throws an exception...
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): [#def251]
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: throw: if ‘wsmand_options_get_pid_file’ throws an exception...
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): [#def252]
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: throw: if ‘u_strdup_printf’ throws an exception...
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): [#def253]
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: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:241:9: throw: if ‘u_free’ throws an exception...
openwsman-2.8.1/src/server/wsmand.c:241:9: danger: ‘fd’ leaks here; was opened at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
#  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): [#def254]
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: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:242:9: throw: if ‘close’ throws an exception...
openwsman-2.8.1/src/server/wsmand.c:242:9: danger: ‘fd’ leaks here; was opened at [(11)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/10)
#  240|   	rc_write(fd, pid, strlen(pid));
#  241|   	u_free(pid);
#  242|-> 	close(fd);
#  243|   
#  244|   	// TODO

Error: GCC_ANALYZER_WARNING (CWE-775): [#def255]
openwsman-2.8.1/src/server/wsmand.c:247:1: 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:247:1: danger: ‘fd’ leaks here; was opened at [(11)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/10)
#  245|   	// remove /var/run/wsmand.pid
#  246|   	// remove /var/lock/subsys/wsmand
#  247|-> }
#  248|   
#  249|   

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
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-50.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-x86_64
project-nameopenwsman-2.8.1-11.fc44
store-results-to/tmp/tmpudk5va4p/openwsman-2.8.1-11.fc44.tar.xz
time-created2026-01-08 20:11:45
time-finished2026-01-08 20:15:13
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpudk5va4p/openwsman-2.8.1-11.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpudk5va4p/openwsman-2.8.1-11.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9