Task #112562 - libxmlb-0.3.26-1.fc45/scan-results.err

back to task #112562
download
Error: GCC_ANALYZER_WARNING (CWE-688):
libxmlb-0.3.26/src/xb-machine.c:1466:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libxmlb-0.3.26/src/xb-machine.c:1452:1: enter_function: entry to ‘xb_machine_opcode_tokenize’
libxmlb-0.3.26/src/xb-machine.c:1463:27: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-machine.c:1464:22: branch_true: ...to here
libxmlb-0.3.26/src/xb-machine.c:1463:27: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-machine.c:1464:22: branch_true: ...to here
libxmlb-0.3.26/src/xb-machine.c:1463:27: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-machine.c:1464:22: branch_true: ...to here
libxmlb-0.3.26/src/xb-machine.c:1463:27: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-machine.c:1464:22: branch_true: ...to here
libxmlb-0.3.26/src/xb-machine.c:1463:27: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-machine.c:1464:22: branch_true: ...to here
libxmlb-0.3.26/src/xb-machine.c:1463:27: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-machine.c:1464:22: branch_true: ...to here
libxmlb-0.3.26/src/xb-machine.c:1463:27: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-machine.c:1464:22: branch_true: ...to here
libxmlb-0.3.26/src/xb-machine.c:1463:27: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-machine.c:1464:22: branch_true: ...to here
libxmlb-0.3.26/src/xb-machine.c:1463:27: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-machine.c:1464:22: branch_true: ...to here
libxmlb-0.3.26/src/xb-machine.c:1463:27: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-machine.c:1464:22: branch_true: ...to here
libxmlb-0.3.26/src/xb-machine.c:1466:17: call_function: calling ‘xb_machine_intern_token’ from ‘xb_machine_opcode_tokenize’
libxmlb-0.3.26/src/xb-machine.c:1466:17: return_function: returning to ‘xb_machine_opcode_tokenize’ from ‘xb_machine_intern_token’
libxmlb-0.3.26/src/xb-machine.c:1466:17: danger: argument 2 (‘xb_machine_intern_token(self, *<unknown>)’) NULL where non-null expected
# 1464|   		if (!xb_string_token_valid(tokens[i]))
# 1465|   			continue;
# 1466|-> 		xb_opcode_append_token(op, xb_machine_intern_token(self, tokens[i]));
# 1467|   	}
# 1468|   	for (guint i = 0; ascii_tokens[i] != NULL; i++) {

Error: GCC_ANALYZER_WARNING (CWE-688):
libxmlb-0.3.26/src/xb-machine.c:1471:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libxmlb-0.3.26/src/xb-machine.c:1468:27: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-machine.c:1469:22: branch_true: ...to here
libxmlb-0.3.26/src/xb-machine.c:1471:17: danger: argument 2 (‘xb_machine_intern_token(self, *<unknown>)’) NULL where non-null expected
# 1469|   		if (!xb_string_token_valid(ascii_tokens[i]))
# 1470|   			continue;
# 1471|-> 		xb_opcode_append_token(op, xb_machine_intern_token(self, ascii_tokens[i]));
# 1472|   	}
# 1473|   }

Error: GCC_ANALYZER_WARNING (CWE-476):
libxmlb-0.3.26/src/xb-silo-node.c:30:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxmlb-0.3.26/src/xb-silo-node.c:11:1: enter_function: entry to ‘xb_silo_node_to_string’
libxmlb-0.3.26/src/xb-silo-node.c:28:29: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-silo-node.c:29:40: branch_true: ...to here
libxmlb-0.3.26/src/xb-silo-node.c:29:40: call_function: inlined call to ‘xb_silo_node_get_attr’ from ‘xb_silo_node_to_string’
libxmlb-0.3.26/src/xb-silo-node.c:30:17: branch_true: ...to here
libxmlb-0.3.26/src/xb-silo-node.c:30:17: danger: dereference of NULL ‘<unknown>’
#   28|   	for (guint idx = 0; idx < self->attr_count; idx++) {
#   29|   		XbSiloNodeAttr *attr = xb_silo_node_get_attr(self, idx);
#   30|-> 		g_string_append_printf(str, "  attr: %u=%u\n", attr->attr_name, attr->attr_value);
#   31|   	}
#   32|   	return g_string_free(str, FALSE);

Error: COMPILER_WARNING (CWE-476):
libxmlb-0.3.26/src/xb-silo-node.c: scope_hint: In function ‘xb_silo_node_to_string’
libxmlb-0.3.26/src/xb-silo-node.c:30:17: warning[-Wnull-dereference]: potential null pointer dereference
#   30 |                 g_string_append_printf(str, "  attr: %u=%u\n", attr->attr_name, attr->attr_value);
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   28|   	for (guint idx = 0; idx < self->attr_count; idx++) {
#   29|   		XbSiloNodeAttr *attr = xb_silo_node_get_attr(self, idx);
#   30|-> 		g_string_append_printf(str, "  attr: %u=%u\n", attr->attr_name, attr->attr_value);
#   31|   	}
#   32|   	return g_string_free(str, FALSE);

Error: GCC_ANALYZER_WARNING (CWE-476):
libxmlb-0.3.26/src/xb-silo-query.c:764:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_local’
libxmlb-0.3.26/src/xb-silo-query.c:749:1: enter_function: entry to ‘xb_silo_query_build_index’
libxmlb-0.3.26/src/xb-silo-query.c:751:27: release_memory: ‘error_local’ is NULL
libxmlb-0.3.26/src/xb-silo-query.c:754:9: call_function: calling ‘XB_IS_SILO’ from ‘xb_silo_query_build_index’
libxmlb-0.3.26/src/xb-silo-query.c:754:9: return_function: returning to ‘xb_silo_query_build_index’ from ‘XB_IS_SILO’
libxmlb-0.3.26/src/xb-silo-query.c:754:9: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-silo-query.c:756:9: branch_true: ...to here
libxmlb-0.3.26/src/xb-silo-query.c:760:13: call_function: calling ‘silo_query_with_root’ from ‘xb_silo_query_build_index’
libxmlb-0.3.26/src/xb-silo-query.c:760:13: return_function: returning to ‘xb_silo_query_build_index’ from ‘silo_query_with_root’
libxmlb-0.3.26/src/xb-silo-query.c:761:12: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-silo-query.c:762:21: branch_true: ...to here
libxmlb-0.3.26/src/xb-silo-query.c:762:21: release_memory: ‘error_local’ is NULL
libxmlb-0.3.26/src/xb-silo-query.c:764:25: release_memory: ‘error_local’ is NULL
libxmlb-0.3.26/src/xb-silo-query.c:764:25: danger: dereference of NULL ‘error_local’
#  762|   		if (g_error_matches(error_local, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT) ||
#  763|   		    g_error_matches(error_local, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
#  764|-> 			g_debug("ignoring index: %s", error_local->message);
#  765|   			return TRUE;
#  766|   		}

Error: GCC_ANALYZER_WARNING (CWE-476):
libxmlb-0.3.26/src/xb-silo.c:509:67: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
libxmlb-0.3.26/src/xb-silo.c:501:1: enter_function: entry to ‘xb_silo_get_node_attr_by_str’
libxmlb-0.3.26/src/xb-silo.c:507:28: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-silo.c:508:37: call_function: inlined call to ‘xb_silo_node_get_attr’ from ‘xb_silo_get_node_attr_by_str’
libxmlb-0.3.26/src/xb-silo.c:509:41: call_function: calling ‘xb_silo_from_strtab’ from ‘xb_silo_get_node_attr_by_str’
libxmlb-0.3.26/src/xb-silo.c:509:41: return_function: returning to ‘xb_silo_get_node_attr_by_str’ from ‘xb_silo_from_strtab’
libxmlb-0.3.26/src/xb-silo.c:510:20: branch_false: following ‘false’ branch...
libxmlb-0.3.26/src/xb-silo.c:512:21: branch_false: ...to here
libxmlb-0.3.26/src/xb-silo.c:512:20: branch_false: following ‘false’ branch...
libxmlb-0.3.26/src/xb-silo.c:507:44: branch_false: ...to here
libxmlb-0.3.26/src/xb-silo.c:507:28: branch_true: following ‘true’ branch...
libxmlb-0.3.26/src/xb-silo.c:508:37: call_function: inlined call to ‘xb_silo_node_get_attr’ from ‘xb_silo_get_node_attr_by_str’
libxmlb-0.3.26/src/xb-silo.c:509:67: danger: dereference of NULL ‘<unknown>’
#  507|   	for (guint8 i = 0; i < attr_count; i++) {
#  508|   		XbSiloNodeAttr *a = xb_silo_node_get_attr(n, i);
#  509|-> 		const gchar *name_tmp = xb_silo_from_strtab(self, a->attr_name, NULL);
#  510|   		if (name_tmp == NULL)
#  511|   			return NULL;

Error: COMPILER_WARNING (CWE-476):
libxmlb-0.3.26/src/xb-silo.c: scope_hint: In function ‘xb_silo_get_node_attr_by_str’
libxmlb-0.3.26/src/xb-silo.c:509:68: warning[-Wnull-dereference]: potential null pointer dereference
#  509 |                 const gchar *name_tmp = xb_silo_from_strtab(self, a->attr_name, NULL);
#      |                                                                   ~^~~~~~~~~~~
#  507|   	for (guint8 i = 0; i < attr_count; i++) {
#  508|   		XbSiloNodeAttr *a = xb_silo_node_get_attr(n, i);
#  509|-> 		const gchar *name_tmp = xb_silo_from_strtab(self, a->attr_name, NULL);
#  510|   		if (name_tmp == NULL)
#  511|   			return NULL;

Error: COMPILER_WARNING (CWE-563):
libxmlb-0.3.26/src/xb-value-bindings.c: scope_hint: In function ‘xb_value_bindings_copy’
libxmlb-0.3.26/src/xb-value-bindings.c:147:26: warning[-Wunused-variable]: unused variable ‘copied’
#  147 |                 gboolean copied = xb_value_bindings_copy_binding(self, i, copy, i);
#      |                          ^~~~~~
#  145|   
#  146|   	for (gsize i = 0; i < G_N_ELEMENTS(_self->values); i++) {
#  147|-> 		gboolean copied = xb_value_bindings_copy_binding(self, i, copy, i);
#  148|   		g_assert(copied);
#  149|   	}