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: COMPILER_WARNING (CWE-1164): [#def7] 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): [#def8] 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: CPPCHECK_WARNING (CWE-476): [#def9] 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: CPPCHECK_WARNING (CWE-476): [#def10] 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: CPPCHECK_WARNING (CWE-457): [#def11] 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): [#def12] 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): [#def13] 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): [#def14] 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): [#def15] 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): [#def16] 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): [#def17] 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): [#def18] 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): [#def19] 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): [#def20] 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): [#def21] 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): [#def22] 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): [#def23] 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): [#def24] 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): [#def25] 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): [#def26] 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): [#def27] 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): [#def28] 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): [#def29] 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): [#def30] 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): [#def31] 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): [#def32] 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): [#def33] 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): [#def34] 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): [#def35] 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): [#def36] 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): [#def37] 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): [#def38] 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): [#def39] 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): [#def40] 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): [#def41] 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-1164): [#def42] 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): [#def43] 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): [#def44] 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): [#def45] 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;
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.92.0 |
| diffbase-analyzer-version-cppcheck | 2.19.1 |
| diffbase-analyzer-version-gcc | 16.0.0 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.0 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-50.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | openwsman-2.8.1-10.fc43 |
| diffbase-store-results-to | /tmp/tmp7s2a0qc0/openwsman-2.8.1-10.fc43.tar.xz |
| diffbase-time-created | 2026-01-08 20:07:59 |
| diffbase-time-finished | 2026-01-08 20:11:17 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp7s2a0qc0/openwsman-2.8.1-10.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp7s2a0qc0/openwsman-2.8.1-10.fc43.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-50.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | openwsman-2.8.1-11.fc44 |
| store-results-to | /tmp/tmpudk5va4p/openwsman-2.8.1-11.fc44.tar.xz |
| time-created | 2026-01-08 20:11:45 |
| time-finished | 2026-01-08 20:15:13 |
| title | Newly introduced findings |
| tool | csmock |
| 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-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |