Task #120354 - added.err

back to task #120354
download
Error: GCC_ANALYZER_WARNING (CWE-457):
authselect-1.7.0/src/cli/main.c: scope_hint: In function ‘requirements’
authselect-1.7.0/src/cli/main.c:639:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘features’
#  637|   done:
#  638|       free(requirements);
#  639|->     authselect_array_free((char **)features);
#  640|       free(profile_id);
#  641|       authselect_profile_free(profile);

Error: GCC_ANALYZER_WARNING (CWE-457):
authselect-1.7.0/src/cli/main.c: scope_hint: In function ‘test’
authselect-1.7.0/src/cli/main.c:730:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘features’
#  728|   
#  729|   done:
#  730|->     authselect_array_free((char **)features);
#  731|       free(profile_id);
#  732|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-416):
authselect-1.7.0/src/lib/util/string_array.c: scope_hint: In function ‘string_array_free.part.0’
authselect-1.7.0/src/lib/util/string_array.c:100:22: warning[-Wanalyzer-use-after-free]: use after ‘reallocarray’ of ‘array’
authselect-1.7.0/src/lib/util/string_array.c: scope_hint: In function ‘string_array_free.part.0’
authselect-1.7.0/src/lib/util/config.h:24: included_from: Included from here.
authselect-1.7.0/src/lib/util/string_array.c:21: included_from: Included from here.
authselect-1.7.0/src/lib/util/string_array.c:81:19: note: in expansion of macro ‘realloc_array’
authselect-1.7.0/src/lib/util/string_array.c: scope_hint: In function ‘string_array_free.part.0’
#   98|       }
#   99|   
#  100|->     for (i = 0; array[i] != NULL; i++) {
#  101|           free(array[i]);
#  102|       }

Error: GCC_ANALYZER_WARNING (CWE-688):
authselect-1.7.0/src/lib/util/string_array.c: scope_hint: In function ‘string_array_del_value’
authselect-1.7.0/src/lib/util/string_array.c:189:13: warning[-Wanalyzer-null-argument]: use of NULL ‘*array’ where non-null expected
authselect-1.7.0/src/common/gettext.h:184: included_from: Included from here.
authselect-1.7.0/src/common/common.h:30: included_from: Included from here.
/usr/include/string.h:171:12: note: argument 1 of ‘strcmp’ must be non-null
#  187|       count = string_array_count(array);
#  188|       for (i = 0; i < count; i++) {
#  189|->         if (strcmp(array[i], value) == 0) {
#  190|               free(array[i]);
#  191|               array[i] = NULL;