Task #132178 - fixed.err
back to task #132178download
Error: COMPILER_WARNING (CWE-704):
p11-kit-0.26.2/common/base64.c: scope_hint: In function ‘p11_b64_pton’
p11-kit-0.26.2/common/base64.c:90:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 90 | pos = strchr (Base64, ch);
# | ^
# 88| break;
# 89|
# 90|-> pos = strchr (Base64, ch);
# 91| if (pos == 0) /* A non-base64 character. */
# 92| return (-1);
Error: COMPILER_WARNING (CWE-704):
p11-kit-0.26.2/common/base64.c:90:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 88| break;
# 89|
# 90|-> pos = strchr (Base64, ch);
# 91| if (pos == 0) /* A non-base64 character. */
# 92| return (-1);
Error: COMPILER_WARNING (CWE-704):
p11-kit-0.26.2/common/url.c: scope_hint: In function ‘p11_url_decode’
p11-kit-0.26.2/common/url.c:79:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 79 | a = strchr (HEX_CHARS_UPPER, p11_ascii_toupper (value[0]));
# | ^
# 77| return NULL;
# 78| }
# 79|-> a = strchr (HEX_CHARS_UPPER, p11_ascii_toupper (value[0]));
# 80| b = strchr (HEX_CHARS_UPPER, p11_ascii_toupper (value[1]));
# 81| if (!a || !b) {
Error: COMPILER_WARNING (CWE-704):
p11-kit-0.26.2/common/url.c:79:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 77| return NULL;
# 78| }
# 79|-> a = strchr (HEX_CHARS_UPPER, p11_ascii_toupper (value[0]));
# 80| b = strchr (HEX_CHARS_UPPER, p11_ascii_toupper (value[1]));
# 81| if (!a || !b) {
Error: COMPILER_WARNING (CWE-704):
p11-kit-0.26.2/common/url.c:80:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 80 | b = strchr (HEX_CHARS_UPPER, p11_ascii_toupper (value[1]));
# | ^
# 78| }
# 79| a = strchr (HEX_CHARS_UPPER, p11_ascii_toupper (value[0]));
# 80|-> b = strchr (HEX_CHARS_UPPER, p11_ascii_toupper (value[1]));
# 81| if (!a || !b) {
# 82| free (result);
Error: COMPILER_WARNING (CWE-704):
p11-kit-0.26.2/common/url.c:80:27: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 78| }
# 79| a = strchr (HEX_CHARS_UPPER, p11_ascii_toupper (value[0]));
# 80|-> b = strchr (HEX_CHARS_UPPER, p11_ascii_toupper (value[1]));
# 81| if (!a || !b) {
# 82| free (result);
Error: GCC_ANALYZER_WARNING (CWE-401):
p11-kit-0.26.2/p11-kit/uri.c:848:25: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(name)’
p11-kit-0.26.2/p11-kit/uri.c:876:1: enter_function: entry to ‘p11_kit_uri_set_vendor_query’
p11-kit-0.26.2/p11-kit/uri.c:882:9: branch_true: following ‘true’ branch (when ‘uri’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:890:12: branch_true: following ‘true’ branch...
p11-kit-0.26.2/p11-kit/uri.c:891:20: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:891:20: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:893:24: branch_false: ...to here
p11-kit-0.26.2/p11-kit/uri.c:893:24: acquire_memory: allocated here
p11-kit-0.26.2/p11-kit/uri.c:893:24: call_function: calling ‘insert_attribute’ from ‘p11_kit_uri_set_vendor_query’
# 846| return_val_if_fail (value != NULL, false);
# 847|
# 848|-> for (i = 0; i < attrs->num; i++) {
# 849| attr = attrs->elem[i];
# 850| if (strcmp (attr->name, (char *)name) > 0)
Error: GCC_ANALYZER_WARNING (CWE-401):
p11-kit-0.26.2/p11-kit/uri.c:848:25: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(value)’
p11-kit-0.26.2/p11-kit/uri.c:876:1: enter_function: entry to ‘p11_kit_uri_set_vendor_query’
p11-kit-0.26.2/p11-kit/uri.c:882:9: branch_true: following ‘true’ branch (when ‘uri’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:890:12: branch_true: following ‘true’ branch...
p11-kit-0.26.2/p11-kit/uri.c:891:20: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:891:20: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:893:24: branch_false: ...to here
p11-kit-0.26.2/p11-kit/uri.c:893:24: acquire_memory: allocated here
p11-kit-0.26.2/p11-kit/uri.c:893:24: call_function: calling ‘insert_attribute’ from ‘p11_kit_uri_set_vendor_query’
# 846| return_val_if_fail (value != NULL, false);
# 847|
# 848|-> for (i = 0; i < attrs->num; i++) {
# 849| attr = attrs->elem[i];
# 850| if (strcmp (attr->name, (char *)name) > 0)
Error: GCC_ANALYZER_WARNING (CWE-401):
p11-kit-0.26.2/p11-kit/uri.c:861:1: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(name)’
p11-kit-0.26.2/p11-kit/uri.c:876:1: enter_function: entry to ‘p11_kit_uri_set_vendor_query’
p11-kit-0.26.2/p11-kit/uri.c:882:9: branch_true: following ‘true’ branch (when ‘uri’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:890:12: branch_true: following ‘true’ branch...
p11-kit-0.26.2/p11-kit/uri.c:891:20: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:891:20: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:893:24: branch_false: ...to here
p11-kit-0.26.2/p11-kit/uri.c:893:24: acquire_memory: allocated here
p11-kit-0.26.2/p11-kit/uri.c:893:24: call_function: calling ‘insert_attribute’ from ‘p11_kit_uri_set_vendor_query’
# 859|
# 860| return p11_array_insert (attrs, i, attr);
# 861|-> }
# 862|
# 863| /**
Error: GCC_ANALYZER_WARNING (CWE-401):
p11-kit-0.26.2/p11-kit/uri.c:861:1: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(value)’
p11-kit-0.26.2/p11-kit/uri.c:876:1: enter_function: entry to ‘p11_kit_uri_set_vendor_query’
p11-kit-0.26.2/p11-kit/uri.c:882:9: branch_true: following ‘true’ branch (when ‘uri’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:890:12: branch_true: following ‘true’ branch...
p11-kit-0.26.2/p11-kit/uri.c:891:20: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:891:20: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:893:24: branch_false: ...to here
p11-kit-0.26.2/p11-kit/uri.c:893:24: acquire_memory: allocated here
p11-kit-0.26.2/p11-kit/uri.c:893:24: call_function: calling ‘insert_attribute’ from ‘p11_kit_uri_set_vendor_query’
# 859|
# 860| return p11_array_insert (attrs, i, attr);
# 861|-> }
# 862|
# 863| /**
Error: GCC_ANALYZER_WARNING (CWE-457):
p11-kit-0.26.2/p11-kit/uri.c:899:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘attr’
p11-kit-0.26.2/p11-kit/uri.c:882:9: branch_true: following ‘true’ branch (when ‘uri’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:883:9: branch_true: ...to here
p11-kit-0.26.2/p11-kit/uri.c:885:21: branch_false: following ‘false’ branch...
p11-kit-0.26.2/p11-kit/uri.c:890:12: branch_false: ...to here
p11-kit-0.26.2/p11-kit/uri.c:890:12: branch_false: following ‘false’ branch...
p11-kit-0.26.2/p11-kit/uri.c:896:12: branch_false: ...to here
p11-kit-0.26.2/p11-kit/uri.c:896:12: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
p11-kit-0.26.2/p11-kit/uri.c:899:23: branch_false: ...to here
p11-kit-0.26.2/p11-kit/uri.c:899:23: danger: use of uninitialized value ‘attr’ here
# 897| p11_array_remove (uri->qattrs, i);
# 898| else {
# 899|-> free (attr->value);
# 900| attr->value = strdup (value);
# 901| }
Error: GCC_ANALYZER_WARNING (CWE-688):
p11-kit-0.26.2/trust/test-module.c:203:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen(p11_path_build(p11_path_build(p11_test_directory("test-module"), "anchors", 0), "unreadable", 0), "w")’ where non-null expected
p11-kit-0.26.2/trust/test-module.c:190:9: branch_true: following ‘true’ branch...
p11-kit-0.26.2/trust/test-module.c:192:26: branch_true: ...to here
p11-kit-0.26.2/trust/test-module.c:202:13: acquire_memory: this call could return NULL
p11-kit-0.26.2/trust/test-module.c:203:9: danger: argument 4 (‘fopen(p11_path_build(p11_path_build(p11_test_directory("test-module"), "anchors", 0), "unreadable", 0), "w")’) from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
# 201| test.unreadable = p11_path_build (anchors, "unreadable", NULL);
# 202| f = fopen (test.unreadable, "w");
# 203|-> fwrite ("foo", 3, 1, f);
# 204| fclose (f);
# 205| chmod (test.unreadable, 0);
Error: GCC_ANALYZER_WARNING (CWE-688):
p11-kit-0.26.2/trust/test-module.c:210:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen("/builddir/build/BUILD/p11-kit-0.26.2/trust/fixtures/thawte.pem", "r")’ where non-null expected
p11-kit-0.26.2/trust/test-module.c:190:9: branch_true: following ‘true’ branch...
p11-kit-0.26.2/trust/test-module.c:192:26: branch_true: ...to here
p11-kit-0.26.2/trust/test-module.c:209:13: acquire_memory: this call could return NULL
p11-kit-0.26.2/trust/test-module.c:210:17: danger: argument 1 (‘fopen("/builddir/build/BUILD/p11-kit-0.26.2/trust/fixtures/thawte.pem", "r")’) from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
# 208| ff = fopen (p, "w");
# 209| f = fopen (SRCDIR "/trust/fixtures/thawte.pem", "r");
# 210|-> while (!feof (f)) {
# 211| size_t size;
# 212| size = fread (buffer, 1, sizeof (buffer), f);
Error: GCC_ANALYZER_WARNING (CWE-688):
p11-kit-0.26.2/trust/test-module.c:216:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen(p11_path_build(p11_path_build(p11_test_directory("test-module"), "anchors", 0), "thawte", 0), "w")’ where non-null expected
p11-kit-0.26.2/trust/test-module.c:190:9: branch_true: following ‘true’ branch...
p11-kit-0.26.2/trust/test-module.c:192:26: branch_true: ...to here
p11-kit-0.26.2/trust/test-module.c:208:14: acquire_memory: this call could return NULL
p11-kit-0.26.2/trust/test-module.c:210:16: branch_true: following ‘true’ branch...
p11-kit-0.26.2/trust/test-module.c:212:24: branch_true: ...to here
p11-kit-0.26.2/trust/test-module.c:216:17: danger: argument 4 (‘fopen(p11_path_build(p11_path_build(p11_test_directory("test-module"), "anchors", 0), "thawte", 0), "w")’) from [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
# 214| assert_fail ("fread()",
# 215| SRCDIR "/trust/fixtures/thawte.pem");
# 216|-> fwrite (buffer, 1, size, ff);
# 217| if (ferror (ff))
# 218| assert_fail ("write()", p);
Error: GCC_ANALYZER_WARNING (CWE-688):
p11-kit-0.26.2/trust/test-module.c:221:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen(p11_path_build(p11_path_build(p11_test_directory("test-module"), "anchors", 0), "thawte", 0), "w")’ where non-null expected
p11-kit-0.26.2/trust/test-module.c:190:9: branch_true: following ‘true’ branch...
p11-kit-0.26.2/trust/test-module.c:192:26: branch_true: ...to here
p11-kit-0.26.2/trust/test-module.c:208:14: acquire_memory: this call could return NULL
p11-kit-0.26.2/trust/test-module.c:210:16: branch_false: following ‘false’ branch...
p11-kit-0.26.2/trust/test-module.c:220:9: branch_false: ...to here
p11-kit-0.26.2/trust/test-module.c:221:9: danger: argument 1 (‘fopen(p11_path_build(p11_path_build(p11_test_directory("test-module"), "anchors", 0), "thawte", 0), "w")’) from [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
# 219| }
# 220| free (p);
# 221|-> fclose (ff);
# 222| fclose (f);
# 223| free (anchors);