Task #119526 - fixed.err

back to task #119526
download
Error: GCC_ANALYZER_WARNING (CWE-476):
xdg-desktop-portal-1.21.1/document-portal/gvdb/gvdb-builder.c:332:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
xdg-desktop-portal-1.21.1/document-portal/gvdb/gvdb-builder.c:524:1: enter_function: entry to ‘gvdb_table_write_contents’
xdg-desktop-portal-1.21.1/document-portal/gvdb/gvdb-builder.c:532:13: call_function: calling ‘gvdb_table_get_content’ from ‘gvdb_table_write_contents’
#  330|   
#  331|   #define chunk(s) (size -= (s), data += (s), data - (s))
#  332|->   memcpy (chunk (sizeof bloom_hdr), &bloom_hdr, sizeof bloom_hdr);
#  333|     memcpy (chunk (sizeof table_hdr), &table_hdr, sizeof table_hdr);
#  334|     *bloom_filter = (guint32_le *) chunk (n_bloom_words * sizeof (guint32_le));

Error: GCC_ANALYZER_WARNING (CWE-476):
xdg-desktop-portal-1.21.1/document-portal/permission-db.c:545:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ids’
xdg-desktop-portal-1.21.1/document-portal/permission-db.c:533:1: enter_function: entry to ‘permission_db_list_ids_by_value’
xdg-desktop-portal-1.21.1/document-portal/permission-db.c:536:27: call_function: calling ‘permission_db_list_ids’ from ‘permission_db_list_ids_by_value’
xdg-desktop-portal-1.21.1/document-portal/permission-db.c:536:27: return_function: returning to ‘permission_db_list_ids_by_value’ from ‘permission_db_list_ids’
xdg-desktop-portal-1.21.1/document-portal/permission-db.c:536:21: release_memory: ‘ids’ is NULL
xdg-desktop-portal-1.21.1/document-portal/permission-db.c:540:3: branch_false: following ‘false’ branch (when ‘self’ is non-NULL)...
xdg-desktop-portal-1.21.1/document-portal/permission-db.c:540:3: branch_false: ...to here
xdg-desktop-portal-1.21.1/document-portal/permission-db.c:541:3: branch_true: following ‘true’ branch (when ‘data’ is non-NULL)...
xdg-desktop-portal-1.21.1/document-portal/permission-db.c:543:9: branch_true: ...to here
xdg-desktop-portal-1.21.1/document-portal/permission-db.c:545:15: danger: dereference of NULL ‘permission_db_list_ids(self) + (long unsigned int)i * 8’
#  543|     res = g_ptr_array_new ();
#  544|   
#  545|->   for (i = 0; ids[i] != NULL; i++)
#  546|       {
#  547|         char *id = ids[i];

Error: COMPILER_WARNING (CWE-704):
xdg-desktop-portal-1.21.1/src/xdp-documents.c: scope_hint: In function ‘xdp_looks_like_document_portal_path’
xdg-desktop-portal-1.21.1/src/xdp-documents.c:290:5: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  290 |   p = strstr (path, "/doc/");
#      |     ^
#  288|       return FALSE;
#  289|   
#  290|->   p = strstr (path, "/doc/");
#  291|     if (!p)
#  292|       return FALSE;

Error: COMPILER_WARNING (CWE-704):
xdg-desktop-portal-1.21.1/src/xdp-documents.c:290:5: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  288|       return FALSE;
#  289|   
#  290|->   p = strstr (path, "/doc/");
#  291|     if (!p)
#  292|       return FALSE;