glib2-2.84.1-1.fc43

List of Findings

Error: SHELLCHECK_WARNING (CWE-456): [#def1]
/usr/bin/glib-gettextize:29:1: warning[SC2209]: Use var=$(command) to assign output (or quote to assign string).
#   27|   # further information how to use it consult the GNU gettext manual.
#   28|   
#   29|-> echo=echo
#   30|   progname=$0
#   31|   force=0

Error: SHELLCHECK_WARNING (CWE-563): [#def2]
/usr/bin/glib-gettextize:49:5: warning[SC2034]: prefix appears unused. Verify use (or export if used externally).
#   47|   case `uname` in
#   48|   MINGW32*)
#   49|->     prefix="`dirname $0`/.."
#   50|       ;;
#   51|   esac

Error: SHELLCHECK_WARNING (CWE-563): [#def3]
/usr/bin/glib-gettextize:53:1: warning[SC2034]: datarootdir appears unused. Verify use (or export if used externally).
#   51|   esac
#   52|   
#   53|-> datarootdir=/usr/share
#   54|   datadir=/usr/share
#   55|   

Error: SHELLCHECK_WARNING (CWE-563): [#def4]
/usr/bin/glib-gettextize:68:7: warning[SC2034]: configstatus appears unused. Verify use (or export if used externally).
#   66|       -r | --run | --r* )
#   67|         shift
#   68|->       configstatus=1 ;;
#   69|       --help | --h* )
#   70|         $echo "$usage"; exit 0 ;;

Error: SHELLCHECK_WARNING (CWE-252): [#def5]
/usr/bin/glib-gettextize:164:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  162|   
#  163|   # Copy files to po/ subdirectory.
#  164|-> cd po
#  165|   for file in *; do
#  166|     rm -f "$srcdir/po/$file"

Error: CPPCHECK_WARNING (CWE-476): [#def6]
glib-2.84.1/fuzzing/driver.c:37: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#   35|     fseek (f, 0, SEEK_SET);
#   36|     buf = (unsigned char*) malloc (len);
#   37|->   n_read = fread (buf, 1, len, f);
#   38|     assert (n_read == len);
#   39|     LLVMFuzzerTestOneInput (buf, len);

Error: CPPCHECK_WARNING (CWE-758): [#def7]
glib-2.84.1/gio/gdbusmessage.c:3729: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 3727|     for (n = 0; n < 32; n++)
# 3728|       {
# 3729|->       if ((value & (1<<n)) != 0)
# 3730|           {
# 3731|             GFlagsValue *flags_value;

Error: CPPCHECK_WARNING (CWE-457): [#def8]
glib-2.84.1/gio/gdbusprivate.c:2024: warning[uninitvar]: Uninitialized variable: arg_types
# 2022|       n = 0;
# 2023|   
# 2024|->   return g_variant_type_new_tuple (arg_types, n);
# 2025|   }
# 2026|   

Error: CPPCHECK_WARNING (CWE-457): [#def9]
glib-2.84.1/gio/gfileinfo.c:1625: error[legacyUninitvar]: Uninitialized variable: *&value
# 1623|     g_return_val_if_fail (G_IS_FILE_INFO (info), G_FILE_TYPE_UNKNOWN);
# 1624|   
# 1625|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_TYPE_UNKNOWN);
# 1626|     return (GFileType)_g_file_attribute_value_get_uint32 (value);
# 1627|   }

Error: CPPCHECK_WARNING (CWE-457): [#def10]
glib-2.84.1/gio/gfileinfo.c:1647: error[legacyUninitvar]: Uninitialized variable: *&value
# 1645|     g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
# 1646|   
# 1647|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN, FALSE);
# 1648|     return _g_file_attribute_value_get_boolean (value);
# 1649|   }

Error: CPPCHECK_WARNING (CWE-457): [#def11]
glib-2.84.1/gio/gfileinfo.c:1669: error[legacyUninitvar]: Uninitialized variable: *&value
# 1667|     g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
# 1668|   
# 1669|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP, FALSE);
# 1670|     return _g_file_attribute_value_get_boolean (value);
# 1671|   }

Error: CPPCHECK_WARNING (CWE-457): [#def12]
glib-2.84.1/gio/gfileinfo.c:1691: error[legacyUninitvar]: Uninitialized variable: *&value
# 1689|     g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
# 1690|   
# 1691|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK, FALSE);
# 1692|     return _g_file_attribute_value_get_boolean (value);
# 1693|   }

Error: CPPCHECK_WARNING (CWE-457): [#def13]
glib-2.84.1/gio/gfileinfo.c:1713: error[legacyUninitvar]: Uninitialized variable: *&value
# 1711|     g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
# 1712|   
# 1713|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_NAME, NULL);
# 1714|     return _g_file_attribute_value_get_byte_string (value);
# 1715|   }

Error: CPPCHECK_WARNING (CWE-457): [#def14]
glib-2.84.1/gio/gfileinfo.c:1735: error[legacyUninitvar]: Uninitialized variable: *&value
# 1733|     g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
# 1734|   
# 1735|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME, NULL);
# 1736|     return _g_file_attribute_value_get_string (value);
# 1737|   }

Error: CPPCHECK_WARNING (CWE-457): [#def15]
glib-2.84.1/gio/gfileinfo.c:1757: error[legacyUninitvar]: Uninitialized variable: *&value
# 1755|     g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
# 1756|   
# 1757|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME, NULL);
# 1758|     return _g_file_attribute_value_get_string (value);
# 1759|   }

Error: CPPCHECK_WARNING (CWE-457): [#def16]
glib-2.84.1/gio/gfileinfo.c:1780: error[legacyUninitvar]: Uninitialized variable: *&value
# 1778|     g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
# 1779|   
# 1780|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_ICON, NULL);
# 1781|   
# 1782|     obj = _g_file_attribute_value_get_object (value);

Error: CPPCHECK_WARNING (CWE-457): [#def17]
glib-2.84.1/gio/gfileinfo.c:1809: error[legacyUninitvar]: Uninitialized variable: *&value
# 1807|     g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
# 1808|   
# 1809|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON, NULL);
# 1810|   
# 1811|     obj = _g_file_attribute_value_get_object (value);

Error: CPPCHECK_WARNING (CWE-457): [#def18]
glib-2.84.1/gio/gfileinfo.c:1836: error[legacyUninitvar]: Uninitialized variable: *&value
# 1834|     g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
# 1835|   
# 1836|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, NULL);
# 1837|     return _g_file_attribute_value_get_string (value);
# 1838|   }

Error: CPPCHECK_WARNING (CWE-457): [#def19]
glib-2.84.1/gio/gfileinfo.c:1860: error[legacyUninitvar]: Uninitialized variable: *&value
# 1858|     g_return_val_if_fail (G_IS_FILE_INFO (info), (goffset) 0);
# 1859|   
# 1860|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_SIZE, (goffset) 0);
# 1861|     return (goffset) _g_file_attribute_value_get_uint64 (value);
# 1862|   }

Error: CPPCHECK_WARNING (CWE-457): [#def20]
glib-2.84.1/gio/gfileinfo.c:2076: error[legacyUninitvar]: Uninitialized variable: *&value
# 2074|     g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
# 2075|   
# 2076|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET, NULL);
# 2077|     return _g_file_attribute_value_get_byte_string (value);
# 2078|   }

Error: CPPCHECK_WARNING (CWE-457): [#def21]
glib-2.84.1/gio/gfileinfo.c:2099: error[legacyUninitvar]: Uninitialized variable: *&value
# 2097|     g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
# 2098|   
# 2099|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_ETAG_VALUE, NULL);
# 2100|     return _g_file_attribute_value_get_string (value);
# 2101|   }

Error: CPPCHECK_WARNING (CWE-457): [#def22]
glib-2.84.1/gio/gfileinfo.c:2122: error[legacyUninitvar]: Uninitialized variable: *&value
# 2120|     g_return_val_if_fail (G_IS_FILE_INFO (info), 0);
# 2121|   
# 2122|->   get_required_attribute (&value, info, G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER, 0);
# 2123|     return _g_file_attribute_value_get_int32 (value);
# 2124|   }

Error: CPPCHECK_WARNING (CWE-758): [#def23]
glib-2.84.1/gio/gsettings.c:496: warning[objectIndex]: The address of variable 'key' might be accessed at non-zero index.
#  494|     for (i = 0; i < n_keys; i++)
#  495|       {
#  496|->       const gchar *key_name = g_quark_to_string (keys[i]);
#  497|   
#  498|         if (g_str_has_suffix (key_name, "/"))

Error: CPPCHECK_WARNING (CWE-457): [#def24]
glib-2.84.1/gio/gsocket.c:2803: error[uninitvar]: Uninitialized variable: result
# 2801|       }
# 2802|   
# 2803|->   if (result < 0)
# 2804|       {
# 2805|         int errsv = get_socket_errno ();

Error: CPPCHECK_WARNING (CWE-628): [#def25]
glib-2.84.1/gio/strinfo.c:284: error[invalidFunctionArg]: Invalid memchr() argument nr 2. The value is -1 but the valid values are '0:'.
#  282|   
#  283|         /* find the end of this string */
#  284|->       ptr = memchr (ptr, '\xff', end - ptr);
#  285|         g_assert (ptr != NULL);
#  286|   

Error: CPPCHECK_WARNING (CWE-457): [#def26]
glib-2.84.1/gio/tests/gdbus-example-subtree.c:320: error[legacyUninitvar]: Uninitialized variable: vtable_to_return
#  318|     *out_user_data = user_data_to_return;
#  319|   
#  320|->   return vtable_to_return;
#  321|   }
#  322|   

Error: CPPCHECK_WARNING (CWE-457): [#def27]
glib-2.84.1/gio/tests/gdbus-testserver.c:671: error[legacyUninitvar]: Uninitialized variable: ret
#  669|           ret = v;
#  670|   
#  671|->       g_dbus_method_invocation_return_value (invocation, ret);
#  672|         g_variant_unref (v);
#  673|       }

Error: CPPCHECK_WARNING (CWE-476): [#def28]
glib-2.84.1/gio/tests/live-g-file.c:309: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
#  307|   
#  308|   	  f = fopen (path, "a");
#  309|-> 	  fprintf (f, "%s\n", basename);
#  310|   	  fclose (f);
#  311|   

Error: CPPCHECK_WARNING (CWE-476): [#def29]
glib-2.84.1/gio/tests/live-g-file.c:310: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: f
#  308|   	  f = fopen (path, "a");
#  309|   	  fprintf (f, "%s\n", basename);
#  310|-> 	  fclose (f);
#  311|   
#  312|   	  g_free (dir);

Error: CPPCHECK_WARNING (CWE-457): [#def30]
glib-2.84.1/gio/tests/sleepy-stream.c:58: warning[uninitvar]: Uninitialized variable: buffer
#   56|       }
#   57|   
#   58|->   return g_strndup (buffer, i);
#   59|   }
#   60|   

Error: CPPCHECK_WARNING (CWE-457): [#def31]
glib-2.84.1/gio/tests/srvtarget.c:125: warning[uninitvar]: Uninitialized variable: result
#  123|         for (o = 0; o < NUM_ORDERINGS; o++)
#  124|   	{
#  125|-> 	  if (!strcmp (result, ordering[o].order))
#  126|   	    {
#  127|   	      ordering[o].seen++;

Error: CPPCHECK_WARNING (CWE-476): [#def32]
glib-2.84.1/gio/tests/tls-certificate.c:409: warning[nullPointer]: Possible null pointer dereference: l
#  407|     for (i = 0; i < 3; i++)
#  408|       {
#  409|->       GTlsCertificate *cert = l->data;
#  410|         gchar *parsed_cert_pem = NULL;
#  411|         g_object_get (cert,

Error: CPPCHECK_WARNING (CWE-476): [#def33]
glib-2.84.1/gio/xdgmime/xdgmime.c:107: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list
#  105|     
#  106|     list = calloc (1, sizeof (XdgDirTimeList));
#  107|->   list->checked = XDG_CHECKED_UNCHECKED;
#  108|     list->directory_name = file_name;
#  109|     list->mtime = mtime;

Error: CPPCHECK_WARNING (CWE-476): [#def34]
glib-2.84.1/gio/xdgmime/xdgmime.c:108: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list
#  106|     list = calloc (1, sizeof (XdgDirTimeList));
#  107|     list->checked = XDG_CHECKED_UNCHECKED;
#  108|->   list->directory_name = file_name;
#  109|     list->mtime = mtime;
#  110|     list->next = dir_time_list;

Error: CPPCHECK_WARNING (CWE-476): [#def35]
glib-2.84.1/gio/xdgmime/xdgmime.c:109: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list
#  107|     list->checked = XDG_CHECKED_UNCHECKED;
#  108|     list->directory_name = file_name;
#  109|->   list->mtime = mtime;
#  110|     list->next = dir_time_list;
#  111|     dir_time_list = list;

Error: CPPCHECK_WARNING (CWE-476): [#def36]
glib-2.84.1/gio/xdgmime/xdgmime.c:110: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list
#  108|     list->directory_name = file_name;
#  109|     list->mtime = mtime;
#  110|->   list->next = dir_time_list;
#  111|     dir_time_list = list;
#  112|   }

Error: CPPCHECK_WARNING (CWE-476): [#def37]
glib-2.84.1/gio/xdgmime/xdgmime.c:138: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file_name
#  136|   
#  137|     file_name = malloc (strlen (directory) + strlen ("/mime.cache") + 1);
#  138|->   strcpy (file_name, directory); strcat (file_name, "/mime.cache");
#  139|     if (stat (file_name, &st) == 0)
#  140|       {

Error: CPPCHECK_WARNING (CWE-401): [#def38]
glib-2.84.1/gio/xdgmime/xdgmime.c:147: error[memleakOnRealloc]: Common realloc mistake: '_caches' nulled but not freed upon failure
#  145|   	  xdg_dir_time_list_add (file_name, st.st_mtime);
#  146|   
#  147|-> 	  _caches = realloc (_caches, sizeof (XdgMimeCache *) * (n_caches + 2));
#  148|   	  _caches[n_caches] = cache;
#  149|             _caches[n_caches + 1] = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def39]
glib-2.84.1/gio/xdgmime/xdgmime.c:158: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file_name
#  156|   
#  157|     file_name = malloc (strlen (directory) + strlen ("/globs2") + 1);
#  158|->   strcpy (file_name, directory); strcat (file_name, "/globs2");
#  159|     if (stat (file_name, &st) == 0)
#  160|       {

Error: CPPCHECK_WARNING (CWE-476): [#def40]
glib-2.84.1/gio/xdgmime/xdgmime.c:168: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file_name
#  166|         free (file_name);
#  167|         file_name = malloc (strlen (directory) + strlen ("/globs") + 1);
#  168|->       strcpy (file_name, directory); strcat (file_name, "/globs");
#  169|         if (stat (file_name, &st) == 0)
#  170|           {

Error: CPPCHECK_WARNING (CWE-476): [#def41]
glib-2.84.1/gio/xdgmime/xdgmime.c:181: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file_name
#  179|   
#  180|     file_name = malloc (strlen (directory) + strlen ("/magic") + 1);
#  181|->   strcpy (file_name, directory); strcat (file_name, "/magic");
#  182|     if (stat (file_name, &st) == 0)
#  183|       {

Error: CPPCHECK_WARNING (CWE-476): [#def42]
glib-2.84.1/gio/xdgmime/xdgmime.c:193: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file_name
#  191|   
#  192|     file_name = malloc (strlen (directory) + strlen ("/aliases") + 1);
#  193|->   strcpy (file_name, directory); strcat (file_name, "/aliases");
#  194|     _xdg_mime_alias_read_from_file (alias_list, file_name);
#  195|     free (file_name);

Error: CPPCHECK_WARNING (CWE-476): [#def43]
glib-2.84.1/gio/xdgmime/xdgmime.c:198: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file_name
#  196|   
#  197|     file_name = malloc (strlen (directory) + strlen ("/subclasses") + 1);
#  198|->   strcpy (file_name, directory); strcat (file_name, "/subclasses");
#  199|     _xdg_mime_parent_read_from_file (parent_list, file_name);
#  200|     free (file_name);

Error: CPPCHECK_WARNING (CWE-476): [#def44]
glib-2.84.1/gio/xdgmime/xdgmime.c:203: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file_name
#  201|   
#  202|     file_name = malloc (strlen (directory) + strlen ("/icons") + 1);
#  203|->   strcpy (file_name, directory); strcat (file_name, "/icons");
#  204|     _xdg_mime_icon_read_from_file (icon_list, file_name);
#  205|     free (file_name);

Error: CPPCHECK_WARNING (CWE-476): [#def45]
glib-2.84.1/gio/xdgmime/xdgmime.c:208: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file_name
#  206|   
#  207|     file_name = malloc (strlen (directory) + strlen ("/generic-icons") + 1);
#  208|->   strcpy (file_name, directory); strcat (file_name, "/generic-icons");
#  209|     _xdg_mime_icon_read_from_file (generic_icon_list, file_name);
#  210|     free (file_name);

Error: CPPCHECK_WARNING (CWE-476): [#def46]
glib-2.84.1/gio/xdgmime/xdgmime.c:250: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mime_subdir
#  248|   
#  249|         mime_subdir = malloc (strlen (xdg_data_home) + strlen ("/mime/") + 1);
#  250|->       strcpy (mime_subdir, xdg_data_home);
#  251|         strcat (mime_subdir, "/mime/");
#  252|   

Error: CPPCHECK_WARNING (CWE-476): [#def47]
glib-2.84.1/gio/xdgmime/xdgmime.c:251: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mime_subdir
#  249|         mime_subdir = malloc (strlen (xdg_data_home) + strlen ("/mime/") + 1);
#  250|         strcpy (mime_subdir, xdg_data_home);
#  251|->       strcat (mime_subdir, "/mime/");
#  252|   
#  253|         xdg_dirs[current_dir++] = mime_subdir;

Error: CPPCHECK_WARNING (CWE-476): [#def48]
glib-2.84.1/gio/xdgmime/xdgmime.c:260: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: guessed_xdg_home
#  258|   
#  259|         guessed_xdg_home = malloc (strlen (home) + strlen ("/.local/share/mime/") + 1);
#  260|->       strcpy (guessed_xdg_home, home);
#  261|         strcat (guessed_xdg_home, "/.local/share/mime/");
#  262|   

Error: CPPCHECK_WARNING (CWE-476): [#def49]
glib-2.84.1/gio/xdgmime/xdgmime.c:261: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: guessed_xdg_home
#  259|         guessed_xdg_home = malloc (strlen (home) + strlen ("/.local/share/mime/") + 1);
#  260|         strcpy (guessed_xdg_home, home);
#  261|->       strcat (guessed_xdg_home, "/.local/share/mime/");
#  262|   
#  263|         xdg_dirs[current_dir++] = guessed_xdg_home;

Error: CPPCHECK_WARNING (CWE-476): [#def50]
glib-2.84.1/gio/xdgmime/xdgmime.c:290: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dir
#  288|           len = end_ptr - ptr + 1;
#  289|         dir = malloc (len + strlen ("/mime/") + 1);
#  290|->       strncpy (dir, ptr, len);
#  291|         dir[len] = '\0';
#  292|         strcat (dir, "/mime/");

Error: CPPCHECK_WARNING (CWE-476): [#def51]
glib-2.84.1/gio/xdgmime/xdgmime.c:291: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dir
#  289|         dir = malloc (len + strlen ("/mime/") + 1);
#  290|         strncpy (dir, ptr, len);
#  291|->       dir[len] = '\0';
#  292|         strcat (dir, "/mime/");
#  293|   

Error: CPPCHECK_WARNING (CWE-476): [#def52]
glib-2.84.1/gio/xdgmime/xdgmime.c:292: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dir
#  290|         strncpy (dir, ptr, len);
#  291|         dir[len] = '\0';
#  292|->       strcat (dir, "/mime/");
#  293|   
#  294|         xdg_dirs[current_dir++] = dir;

Error: CPPCHECK_WARNING (CWE-476): [#def53]
glib-2.84.1/gio/xdgmime/xdgmime.c:345: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: xdg_dirs
#  343|         xdg_dirs = calloc (i + 1  /* NULL terminator */, sizeof (char*));
#  344|         for (i = 0; dirs[i] != NULL; i++)
#  345|->         xdg_dirs[i] = strdup (dirs[i]);
#  346|         xdg_dirs[i] = NULL;
#  347|       }

Error: CPPCHECK_WARNING (CWE-476): [#def54]
glib-2.84.1/gio/xdgmime/xdgmime.c:346: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: xdg_dirs
#  344|         for (i = 0; dirs[i] != NULL; i++)
#  345|           xdg_dirs[i] = strdup (dirs[i]);
#  346|->       xdg_dirs[i] = NULL;
#  347|       }
#  348|   

Error: CPPCHECK_WARNING (CWE-476): [#def55]
glib-2.84.1/gio/xdgmime/xdgmime.c:405: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file_name
#  403|     /* Check the mime.cache file */
#  404|     file_name = malloc (strlen (directory) + strlen ("/mime.cache") + 1);
#  405|->   strcpy (file_name, directory); strcat (file_name, "/mime.cache");
#  406|     invalid = xdg_check_file (file_name, &exists);
#  407|     free (file_name);

Error: CPPCHECK_WARNING (CWE-476): [#def56]
glib-2.84.1/gio/xdgmime/xdgmime.c:420: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file_name
#  418|     /* Check the globs file */
#  419|     file_name = malloc (strlen (directory) + strlen ("/globs") + 1);
#  420|->   strcpy (file_name, directory); strcat (file_name, "/globs");
#  421|     invalid = xdg_check_file (file_name, NULL);
#  422|     free (file_name);

Error: CPPCHECK_WARNING (CWE-476): [#def57]
glib-2.84.1/gio/xdgmime/xdgmime.c:431: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: file_name
#  429|     /* Check the magic file */
#  430|     file_name = malloc (strlen (directory) + strlen ("/magic") + 1);
#  431|->   strcpy (file_name, directory); strcat (file_name, "/magic");
#  432|     invalid = xdg_check_file (file_name, NULL);
#  433|     free (file_name);

Error: CPPCHECK_WARNING (CWE-476): [#def58]
glib-2.84.1/gio/xdgmime/xdgmime.c:922: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
#  920|     n = (i + 1) * sizeof (char *);
#  921|     result = (char **) malloc (n);
#  922|->   memcpy (result, parents, n);
#  923|   
#  924|     return result;

Error: CPPCHECK_WARNING (CWE-476): [#def59]
glib-2.84.1/gio/xdgmime/xdgmime.c:969: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list_el
#  967|     /* Make a new list element */
#  968|     list_el = calloc (1, sizeof (XdgCallbackList));
#  969|->   list_el->callback_id = callback_id;
#  970|     list_el->callback = callback;
#  971|     list_el->data = data;

Error: CPPCHECK_WARNING (CWE-476): [#def60]
glib-2.84.1/gio/xdgmime/xdgmime.c:970: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list_el
#  968|     list_el = calloc (1, sizeof (XdgCallbackList));
#  969|     list_el->callback_id = callback_id;
#  970|->   list_el->callback = callback;
#  971|     list_el->data = data;
#  972|     list_el->destroy = destroy;

Error: CPPCHECK_WARNING (CWE-476): [#def61]
glib-2.84.1/gio/xdgmime/xdgmime.c:971: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list_el
#  969|     list_el->callback_id = callback_id;
#  970|     list_el->callback = callback;
#  971|->   list_el->data = data;
#  972|     list_el->destroy = destroy;
#  973|     list_el->next = callback_list;

Error: CPPCHECK_WARNING (CWE-476): [#def62]
glib-2.84.1/gio/xdgmime/xdgmime.c:972: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list_el
#  970|     list_el->callback = callback;
#  971|     list_el->data = data;
#  972|->   list_el->destroy = destroy;
#  973|     list_el->next = callback_list;
#  974|     if (list_el->next)

Error: CPPCHECK_WARNING (CWE-476): [#def63]
glib-2.84.1/gio/xdgmime/xdgmime.c:973: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list_el
#  971|     list_el->data = data;
#  972|     list_el->destroy = destroy;
#  973|->   list_el->next = callback_list;
#  974|     if (list_el->next)
#  975|       list_el->next->prev = list_el;

Error: CPPCHECK_WARNING (CWE-476): [#def64]
glib-2.84.1/gio/xdgmime/xdgmime.c:974: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list_el
#  972|     list_el->destroy = destroy;
#  973|     list_el->next = callback_list;
#  974|->   if (list_el->next)
#  975|       list_el->next->prev = list_el;
#  976|   

Error: CPPCHECK_WARNING (CWE-476): [#def65]
glib-2.84.1/gio/xdgmime/xdgmimealias.c:53: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list
#   51|     list = malloc (sizeof (XdgAliasList));
#   52|   
#   53|->   list->aliases = NULL;
#   54|     list->n_aliases = 0;
#   55|   

Error: CPPCHECK_WARNING (CWE-476): [#def66]
glib-2.84.1/gio/xdgmime/xdgmimealias.c:54: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list
#   52|   
#   53|     list->aliases = NULL;
#   54|->   list->n_aliases = 0;
#   55|   
#   56|     return list;

Error: CPPCHECK_WARNING (CWE-476): [#def67]
glib-2.84.1/gio/xdgmime/xdgmimecache.c:147: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cache
#  145|     
#  146|     cache = (XdgMimeCache *) malloc (sizeof (XdgMimeCache));
#  147|->   cache->minor = minor;
#  148|     cache->ref_count = 1;
#  149|     cache->buffer = buffer;

Error: CPPCHECK_WARNING (CWE-476): [#def68]
glib-2.84.1/gio/xdgmime/xdgmimecache.c:148: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cache
#  146|     cache = (XdgMimeCache *) malloc (sizeof (XdgMimeCache));
#  147|     cache->minor = minor;
#  148|->   cache->ref_count = 1;
#  149|     cache->buffer = buffer;
#  150|     cache->size = st.st_size;

Error: CPPCHECK_WARNING (CWE-476): [#def69]
glib-2.84.1/gio/xdgmime/xdgmimecache.c:149: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cache
#  147|     cache->minor = minor;
#  148|     cache->ref_count = 1;
#  149|->   cache->buffer = buffer;
#  150|     cache->size = st.st_size;
#  151|   

Error: CPPCHECK_WARNING (CWE-476): [#def70]
glib-2.84.1/gio/xdgmime/xdgmimecache.c:150: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: cache
#  148|     cache->ref_count = 1;
#  149|     cache->buffer = buffer;
#  150|->   cache->size = st.st_size;
#  151|   
#  152|    done:

Error: CPPCHECK_WARNING (CWE-476): [#def71]
glib-2.84.1/gio/xdgmime/xdgmimecache.c:632: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  630|     lower = strdup (str);
#  631|     p = lower;
#  632|->   while (*p != 0)
#  633|       {
#  634|         char c = *p;

Error: CPPCHECK_WARNING (CWE-476): [#def72]
glib-2.84.1/gio/xdgmime/xdgmimecache.c:1125: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
# 1123|     
# 1124|     result = (char **) malloc (p * sizeof (char *));
# 1125|->   memcpy (result, all_parents, p * sizeof (char *));
# 1126|   
# 1127|     return result;

Error: CPPCHECK_WARNING (CWE-476): [#def73]
glib-2.84.1/gio/xdgmime/xdgmimeglob.c:383: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: p
#  381|     lower = strdup (str);
#  382|     p = lower;
#  383|->   while (*p != 0)
#  384|       {
#  385|         char c = *p;

Error: CPPCHECK_WARNING (CWE-476): [#def74]
glib-2.84.1/gio/xdgmime/xdgmimeicon.c:52: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list
#   50|     list = malloc (sizeof (XdgIconList));
#   51|   
#   52|->   list->icons = NULL;
#   53|     list->n_icons = 0;
#   54|   

Error: CPPCHECK_WARNING (CWE-476): [#def75]
glib-2.84.1/gio/xdgmime/xdgmimeicon.c:53: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list
#   51|   
#   52|     list->icons = NULL;
#   53|->   list->n_icons = 0;
#   54|   
#   55|     return list;

Error: CPPCHECK_WARNING (CWE-401): [#def76]
glib-2.84.1/gio/xdgmime/xdgmimemagic.c:174: error[memleakOnRealloc]: Common realloc mistake: 'retval' nulled but not freed upon failure
#  172|   	{
#  173|   	  len = len + 128;
#  174|-> 	  retval = realloc (retval, len);
#  175|   	}
#  176|       }

Error: CPPCHECK_WARNING (CWE-476): [#def77]
glib-2.84.1/gio/xdgmime/xdgmimeparent.c:54: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list
#   52|     list = malloc (sizeof (XdgParentList));
#   53|   
#   54|->   list->parents = NULL;
#   55|     list->n_mimes = 0;
#   56|   

Error: CPPCHECK_WARNING (CWE-476): [#def78]
glib-2.84.1/gio/xdgmime/xdgmimeparent.c:55: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list
#   53|   
#   54|     list->parents = NULL;
#   55|->   list->n_mimes = 0;
#   56|   
#   57|     return list;

Error: CPPCHECK_WARNING (CWE-476): [#def79]
glib-2.84.1/girepository/cmph/bdz.c:166: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: marked_edge
#  164|   	cmph_uint32 tmp_edge;
#  165|   	cmph_uint8 * marked_edge =malloc((size_t)(nedges >> 3) + 1);
#  166|-> 	memset(marked_edge, 0, (size_t)(nedges >> 3) + 1);
#  167|   
#  168|   	for(i=0;i<nedges;i++){

Error: CPPCHECK_WARNING (CWE-476): [#def80]
glib-2.84.1/girepository/cmph/bdz.c:354: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  352|   	#endif
#  353|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  354|-> 	mphf->algo = mph->algo;
#  355|   	bdzf = (bdz_data_t *)malloc(sizeof(bdz_data_t));
#  356|   	bdzf->g = bdz->g;

Error: CPPCHECK_WARNING (CWE-476): [#def81]
glib-2.84.1/girepository/cmph/bdz.c:356: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdzf
#  354|   	mphf->algo = mph->algo;
#  355|   	bdzf = (bdz_data_t *)malloc(sizeof(bdz_data_t));
#  356|-> 	bdzf->g = bdz->g;
#  357|   	bdz->g = NULL; //transfer memory ownership
#  358|   	bdzf->hl = bdz->hl;

Error: CPPCHECK_WARNING (CWE-476): [#def82]
glib-2.84.1/girepository/cmph/bdz.c:358: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdzf
#  356|   	bdzf->g = bdz->g;
#  357|   	bdz->g = NULL; //transfer memory ownership
#  358|-> 	bdzf->hl = bdz->hl;
#  359|   	bdz->hl = NULL; //transfer memory ownership
#  360|   	bdzf->ranktable = bdz->ranktable;

Error: CPPCHECK_WARNING (CWE-476): [#def83]
glib-2.84.1/girepository/cmph/bdz.c:360: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdzf
#  358|   	bdzf->hl = bdz->hl;
#  359|   	bdz->hl = NULL; //transfer memory ownership
#  360|-> 	bdzf->ranktable = bdz->ranktable;
#  361|   	bdz->ranktable = NULL; //transfer memory ownership
#  362|   	bdzf->ranktablesize = bdz->ranktablesize;

Error: CPPCHECK_WARNING (CWE-476): [#def84]
glib-2.84.1/girepository/cmph/bdz.c:362: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdzf
#  360|   	bdzf->ranktable = bdz->ranktable;
#  361|   	bdz->ranktable = NULL; //transfer memory ownership
#  362|-> 	bdzf->ranktablesize = bdz->ranktablesize;
#  363|   	bdzf->k = bdz->k;
#  364|   	bdzf->b = bdz->b;

Error: CPPCHECK_WARNING (CWE-476): [#def85]
glib-2.84.1/girepository/cmph/bdz.c:363: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdzf
#  361|   	bdz->ranktable = NULL; //transfer memory ownership
#  362|   	bdzf->ranktablesize = bdz->ranktablesize;
#  363|-> 	bdzf->k = bdz->k;
#  364|   	bdzf->b = bdz->b;
#  365|   	bdzf->n = bdz->n;

Error: CPPCHECK_WARNING (CWE-476): [#def86]
glib-2.84.1/girepository/cmph/bdz.c:364: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdzf
#  362|   	bdzf->ranktablesize = bdz->ranktablesize;
#  363|   	bdzf->k = bdz->k;
#  364|-> 	bdzf->b = bdz->b;
#  365|   	bdzf->n = bdz->n;
#  366|   	bdzf->m = bdz->m;

Error: CPPCHECK_WARNING (CWE-476): [#def87]
glib-2.84.1/girepository/cmph/bdz.c:365: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdzf
#  363|   	bdzf->k = bdz->k;
#  364|   	bdzf->b = bdz->b;
#  365|-> 	bdzf->n = bdz->n;
#  366|   	bdzf->m = bdz->m;
#  367|   	bdzf->r = bdz->r;

Error: CPPCHECK_WARNING (CWE-476): [#def88]
glib-2.84.1/girepository/cmph/bdz.c:366: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdzf
#  364|   	bdzf->b = bdz->b;
#  365|   	bdzf->n = bdz->n;
#  366|-> 	bdzf->m = bdz->m;
#  367|   	bdzf->r = bdz->r;
#  368|   	mphf->data = bdzf;

Error: CPPCHECK_WARNING (CWE-476): [#def89]
glib-2.84.1/girepository/cmph/bdz.c:367: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdzf
#  365|   	bdzf->n = bdz->n;
#  366|   	bdzf->m = bdz->m;
#  367|-> 	bdzf->r = bdz->r;
#  368|   	mphf->data = bdzf;
#  369|   	mphf->size = bdz->m;

Error: CPPCHECK_WARNING (CWE-476): [#def90]
glib-2.84.1/girepository/cmph/bdz.c:368: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  366|   	bdzf->m = bdz->m;
#  367|   	bdzf->r = bdz->r;
#  368|-> 	mphf->data = bdzf;
#  369|   	mphf->size = bdz->m;
#  370|   

Error: CPPCHECK_WARNING (CWE-476): [#def91]
glib-2.84.1/girepository/cmph/bdz.c:369: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  367|   	bdzf->r = bdz->r;
#  368|   	mphf->data = bdzf;
#  369|-> 	mphf->size = bdz->m;
#  370|   
#  371|   	DEBUGP("Successfully generated minimal perfect hash\n");

Error: CPPCHECK_WARNING (CWE-476): [#def92]
glib-2.84.1/girepository/cmph/bdz.c:423: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: marked_vertices
#  421|           cmph_uint32 sizeg = (cmph_uint32)ceil(bdz->n/4.0);
#  422|   	bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8));	
#  423|-> 	memset(marked_vertices, 0, (size_t)(bdz->n >> 3) + 1);
#  424|   	memset(bdz->g, 0xff, (size_t)(sizeg));
#  425|   

Error: CPPCHECK_WARNING (CWE-476): [#def93]
glib-2.84.1/girepository/cmph/bdz.c:544: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  542|   	DEBUGP("Hash state has %u bytes\n", buflen);
#  543|   	buf = (char *)malloc((size_t)buflen);
#  544|-> 	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  545|   	bdz->hl = hash_state_load(buf, buflen);
#  546|   	free(buf);

Error: CPPCHECK_WARNING (CWE-476): [#def94]
glib-2.84.1/girepository/cmph/bdz.c:545: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz
#  543|   	buf = (char *)malloc((size_t)buflen);
#  544|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  545|-> 	bdz->hl = hash_state_load(buf, buflen);
#  546|   	free(buf);
#  547|   	

Error: CPPCHECK_WARNING (CWE-476): [#def95]
glib-2.84.1/girepository/cmph/bdz.c:553: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz
#  551|   	nbytes = fread(&(bdz->m), sizeof(cmph_uint32), (size_t)1, f);	
#  552|   	nbytes = fread(&(bdz->r), sizeof(cmph_uint32), (size_t)1, f);	
#  553|-> 	sizeg = (cmph_uint32)ceil(bdz->n/4.0);
#  554|   	bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8));
#  555|   	nbytes = fread(bdz->g, sizeg*sizeof(cmph_uint8), (size_t)1, f);

Error: CPPCHECK_WARNING (CWE-476): [#def96]
glib-2.84.1/girepository/cmph/bdz.c:554: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz
#  552|   	nbytes = fread(&(bdz->r), sizeof(cmph_uint32), (size_t)1, f);	
#  553|   	sizeg = (cmph_uint32)ceil(bdz->n/4.0);
#  554|-> 	bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8));
#  555|   	nbytes = fread(bdz->g, sizeg*sizeof(cmph_uint8), (size_t)1, f);
#  556|   

Error: CPPCHECK_WARNING (CWE-476): [#def97]
glib-2.84.1/girepository/cmph/bdz.c:555: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz
#  553|   	sizeg = (cmph_uint32)ceil(bdz->n/4.0);
#  554|   	bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8));
#  555|-> 	nbytes = fread(bdz->g, sizeg*sizeof(cmph_uint8), (size_t)1, f);
#  556|   
#  557|   	nbytes = fread(&(bdz->k), sizeof(cmph_uint32), (size_t)1, f);

Error: CPPCHECK_WARNING (CWE-476): [#def98]
glib-2.84.1/girepository/cmph/bdz.c:561: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz
#  559|   	nbytes = fread(&(bdz->ranktablesize), sizeof(cmph_uint32), (size_t)1, f);
#  560|   
#  561|-> 	bdz->ranktable = (cmph_uint32 *)calloc((size_t)bdz->ranktablesize, sizeof(cmph_uint32));
#  562|   	nbytes = fread(bdz->ranktable, sizeof(cmph_uint32)*(bdz->ranktablesize), (size_t)1, f);
#  563|   	if (nbytes == 0 && ferror(f)) {

Error: CPPCHECK_WARNING (CWE-476): [#def99]
glib-2.84.1/girepository/cmph/bdz.c:562: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz
#  560|   
#  561|   	bdz->ranktable = (cmph_uint32 *)calloc((size_t)bdz->ranktablesize, sizeof(cmph_uint32));
#  562|-> 	nbytes = fread(bdz->ranktable, sizeof(cmph_uint32)*(bdz->ranktablesize), (size_t)1, f);
#  563|   	if (nbytes == 0 && ferror(f)) {
#  564|             fprintf(stderr, "ERROR: %s\n", strerror(errno));

Error: CPPCHECK_WARNING (CWE-476): [#def100]
glib-2.84.1/girepository/cmph/bdz_ph.c:153: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: marked_edge
#  151|   	cmph_uint32 tmp_edge;
#  152|   	cmph_uint8 * marked_edge =malloc((size_t)(nedges >> 3) + 1);
#  153|-> 	memset(marked_edge, 0, (size_t)(nedges >> 3) + 1);
#  154|   
#  155|   	for(i=0;i<nedges;i++){

Error: CPPCHECK_WARNING (CWE-476): [#def101]
glib-2.84.1/girepository/cmph/bdz_ph.c:324: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  322|   	#endif
#  323|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  324|-> 	mphf->algo = mph->algo;
#  325|   	bdz_phf = (bdz_ph_data_t *)malloc(sizeof(bdz_ph_data_t));
#  326|   	bdz_phf->g = bdz_ph->g;

Error: CPPCHECK_WARNING (CWE-476): [#def102]
glib-2.84.1/girepository/cmph/bdz_ph.c:326: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz_phf
#  324|   	mphf->algo = mph->algo;
#  325|   	bdz_phf = (bdz_ph_data_t *)malloc(sizeof(bdz_ph_data_t));
#  326|-> 	bdz_phf->g = bdz_ph->g;
#  327|   	bdz_ph->g = NULL; //transfer memory ownership
#  328|   	bdz_phf->hl = bdz_ph->hl;

Error: CPPCHECK_WARNING (CWE-476): [#def103]
glib-2.84.1/girepository/cmph/bdz_ph.c:328: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz_phf
#  326|   	bdz_phf->g = bdz_ph->g;
#  327|   	bdz_ph->g = NULL; //transfer memory ownership
#  328|-> 	bdz_phf->hl = bdz_ph->hl;
#  329|   	bdz_ph->hl = NULL; //transfer memory ownership
#  330|   	bdz_phf->n = bdz_ph->n;

Error: CPPCHECK_WARNING (CWE-476): [#def104]
glib-2.84.1/girepository/cmph/bdz_ph.c:330: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz_phf
#  328|   	bdz_phf->hl = bdz_ph->hl;
#  329|   	bdz_ph->hl = NULL; //transfer memory ownership
#  330|-> 	bdz_phf->n = bdz_ph->n;
#  331|   	bdz_phf->m = bdz_ph->m;
#  332|   	bdz_phf->r = bdz_ph->r;

Error: CPPCHECK_WARNING (CWE-476): [#def105]
glib-2.84.1/girepository/cmph/bdz_ph.c:331: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz_phf
#  329|   	bdz_ph->hl = NULL; //transfer memory ownership
#  330|   	bdz_phf->n = bdz_ph->n;
#  331|-> 	bdz_phf->m = bdz_ph->m;
#  332|   	bdz_phf->r = bdz_ph->r;
#  333|   	mphf->data = bdz_phf;

Error: CPPCHECK_WARNING (CWE-476): [#def106]
glib-2.84.1/girepository/cmph/bdz_ph.c:332: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz_phf
#  330|   	bdz_phf->n = bdz_ph->n;
#  331|   	bdz_phf->m = bdz_ph->m;
#  332|-> 	bdz_phf->r = bdz_ph->r;
#  333|   	mphf->data = bdz_phf;
#  334|   	mphf->size = bdz_ph->n;

Error: CPPCHECK_WARNING (CWE-476): [#def107]
glib-2.84.1/girepository/cmph/bdz_ph.c:333: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  331|   	bdz_phf->m = bdz_ph->m;
#  332|   	bdz_phf->r = bdz_ph->r;
#  333|-> 	mphf->data = bdz_phf;
#  334|   	mphf->size = bdz_ph->n;
#  335|   

Error: CPPCHECK_WARNING (CWE-476): [#def108]
glib-2.84.1/girepository/cmph/bdz_ph.c:334: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  332|   	bdz_phf->r = bdz_ph->r;
#  333|   	mphf->data = bdz_phf;
#  334|-> 	mphf->size = bdz_ph->n;
#  335|   
#  336|   	DEBUGP("Successfully generated minimal perfect hash\n");

Error: CPPCHECK_WARNING (CWE-476): [#def109]
glib-2.84.1/girepository/cmph/bdz_ph.c:388: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: marked_vertices
#  386|   	cmph_uint32 sizeg = (cmph_uint32)ceil(bdz_ph->n/4.0);
#  387|   	bdz_ph->g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8));	
#  388|-> 	memset(marked_vertices, 0, (size_t)(bdz_ph->n >> 3) + 1);
#  389|   	//memset(bdz_ph->g, 0xff, sizeg);
#  390|   

Error: CPPCHECK_WARNING (CWE-476): [#def110]
glib-2.84.1/girepository/cmph/bdz_ph.c:438: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_g
#  436|   	{	
#  437|               idx = i/5;
#  438|->             byte = new_g[idx];
#  439|               value = GETVALUE(bdz_ph->g, i);
#  440|               byte = (cmph_uint8) (byte + value*pow3_table[i%5U]);

Error: CPPCHECK_WARNING (CWE-476): [#def111]
glib-2.84.1/girepository/cmph/bdz_ph.c:441: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_g
#  439|               value = GETVALUE(bdz_ph->g, i);
#  440|               byte = (cmph_uint8) (byte + value*pow3_table[i%5U]);
#  441|->             new_g[idx] = byte;
#  442|           }
#  443|   	free(bdz_ph->g);

Error: CPPCHECK_WARNING (CWE-476): [#def112]
glib-2.84.1/girepository/cmph/bdz_ph.c:499: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  497|   	DEBUGP("Hash state has %u bytes\n", buflen);
#  498|   	buf = (char *)malloc((size_t)buflen);
#  499|-> 	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  500|   	bdz_ph->hl = hash_state_load(buf, buflen);
#  501|   	free(buf);

Error: CPPCHECK_WARNING (CWE-476): [#def113]
glib-2.84.1/girepository/cmph/bdz_ph.c:500: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz_ph
#  498|   	buf = (char *)malloc((size_t)buflen);
#  499|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  500|-> 	bdz_ph->hl = hash_state_load(buf, buflen);
#  501|   	free(buf);
#  502|   	

Error: CPPCHECK_WARNING (CWE-476): [#def114]
glib-2.84.1/girepository/cmph/bdz_ph.c:508: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz_ph
#  506|   	nbytes = fread(&(bdz_ph->m), sizeof(cmph_uint32), (size_t)1, f);	
#  507|   	nbytes = fread(&(bdz_ph->r), sizeof(cmph_uint32), (size_t)1, f);	
#  508|-> 	sizeg = (cmph_uint32)ceil(bdz_ph->n/5.0);
#  509|   	bdz_ph->g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8));
#  510|   	nbytes = fread(bdz_ph->g, sizeg*sizeof(cmph_uint8), (size_t)1, f);

Error: CPPCHECK_WARNING (CWE-476): [#def115]
glib-2.84.1/girepository/cmph/bdz_ph.c:509: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz_ph
#  507|   	nbytes = fread(&(bdz_ph->r), sizeof(cmph_uint32), (size_t)1, f);	
#  508|   	sizeg = (cmph_uint32)ceil(bdz_ph->n/5.0);
#  509|-> 	bdz_ph->g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8));
#  510|   	nbytes = fread(bdz_ph->g, sizeg*sizeof(cmph_uint8), (size_t)1, f);
#  511|   

Error: CPPCHECK_WARNING (CWE-476): [#def116]
glib-2.84.1/girepository/cmph/bdz_ph.c:510: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bdz_ph
#  508|   	sizeg = (cmph_uint32)ceil(bdz_ph->n/5.0);
#  509|   	bdz_ph->g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8));
#  510|-> 	nbytes = fread(bdz_ph->g, sizeg*sizeof(cmph_uint8), (size_t)1, f);
#  511|   
#  512|   	if (nbytes == 0 && ferror(f)) {

Error: CPPCHECK_WARNING (CWE-476): [#def117]
glib-2.84.1/girepository/cmph/bmz.c:136: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: visited
#  134|   	  DEBUGP("Searching step\n");
#  135|   	  visited = (cmph_uint8 *)malloc((size_t)bmz->n/8 + 1);
#  136|-> 	  memset(visited, 0, (size_t)bmz->n/8 + 1);
#  137|   	  used_edges = (cmph_uint8 *)malloc((size_t)bmz->m/8 + 1);
#  138|   	  memset(used_edges, 0, (size_t)bmz->m/8 + 1);

Error: CPPCHECK_WARNING (CWE-476): [#def118]
glib-2.84.1/girepository/cmph/bmz.c:138: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: used_edges
#  136|   	  memset(visited, 0, (size_t)bmz->n/8 + 1);
#  137|   	  used_edges = (cmph_uint8 *)malloc((size_t)bmz->m/8 + 1);
#  138|-> 	  memset(used_edges, 0, (size_t)bmz->m/8 + 1);
#  139|   	  free(bmz->g);
#  140|   	  bmz->g = (cmph_uint32 *)calloc((size_t)bmz->n, sizeof(cmph_uint32));

Error: CPPCHECK_WARNING (CWE-476): [#def119]
glib-2.84.1/girepository/cmph/bmz.c:174: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  172|   	}
#  173|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  174|-> 	mphf->algo = mph->algo;
#  175|   	bmzf = (bmz_data_t *)malloc(sizeof(bmz_data_t));
#  176|   	bmzf->g = bmz->g;

Error: CPPCHECK_WARNING (CWE-476): [#def120]
glib-2.84.1/girepository/cmph/bmz.c:176: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmzf
#  174|   	mphf->algo = mph->algo;
#  175|   	bmzf = (bmz_data_t *)malloc(sizeof(bmz_data_t));
#  176|-> 	bmzf->g = bmz->g;
#  177|   	bmz->g = NULL; //transfer memory ownership
#  178|   	bmzf->hashes = bmz->hashes;

Error: CPPCHECK_WARNING (CWE-476): [#def121]
glib-2.84.1/girepository/cmph/bmz.c:178: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmzf
#  176|   	bmzf->g = bmz->g;
#  177|   	bmz->g = NULL; //transfer memory ownership
#  178|-> 	bmzf->hashes = bmz->hashes;
#  179|   	bmz->hashes = NULL; //transfer memory ownership
#  180|   	bmzf->n = bmz->n;

Error: CPPCHECK_WARNING (CWE-476): [#def122]
glib-2.84.1/girepository/cmph/bmz.c:180: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmzf
#  178|   	bmzf->hashes = bmz->hashes;
#  179|   	bmz->hashes = NULL; //transfer memory ownership
#  180|-> 	bmzf->n = bmz->n;
#  181|   	bmzf->m = bmz->m;
#  182|   	mphf->data = bmzf;

Error: CPPCHECK_WARNING (CWE-476): [#def123]
glib-2.84.1/girepository/cmph/bmz.c:181: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmzf
#  179|   	bmz->hashes = NULL; //transfer memory ownership
#  180|   	bmzf->n = bmz->n;
#  181|-> 	bmzf->m = bmz->m;
#  182|   	mphf->data = bmzf;
#  183|   	mphf->size = bmz->m;

Error: CPPCHECK_WARNING (CWE-476): [#def124]
glib-2.84.1/girepository/cmph/bmz.c:182: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  180|   	bmzf->n = bmz->n;
#  181|   	bmzf->m = bmz->m;
#  182|-> 	mphf->data = bmzf;
#  183|   	mphf->size = bmz->m;
#  184|   

Error: CPPCHECK_WARNING (CWE-476): [#def125]
glib-2.84.1/girepository/cmph/bmz.c:183: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  181|   	bmzf->m = bmz->m;
#  182|   	mphf->data = bmzf;
#  183|-> 	mphf->size = bmz->m;
#  184|   
#  185|   	DEBUGP("Successfully generated minimal perfect hash\n");

Error: CPPCHECK_WARNING (CWE-401): [#def126]
glib-2.84.1/girepository/cmph/bmz.c:321: error[memleakOnRealloc]: Common realloc mistake: 'unused_g_values' nulled but not freed upon failure
#  319|   					        if(nunused_g_values == unused_g_values_capacity)
#  320|   						{
#  321|->    						        unused_g_values = (cmph_uint32 *)realloc(unused_g_values, (unused_g_values_capacity + BUFSIZ)*sizeof(cmph_uint32));
#  322|   						        unused_g_values_capacity += BUFSIZ;  							
#  323|   						} 

Error: CPPCHECK_WARNING (CWE-476): [#def127]
glib-2.84.1/girepository/cmph/bmz.c:500: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz
#  498|   	mphf->data = bmz;
#  499|   	nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f);
#  500|-> 	bmz->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1));
#  501|   	bmz->hashes[nhashes] = NULL;
#  502|   	DEBUGP("Reading %u hashes\n", nhashes);

Error: CPPCHECK_WARNING (CWE-476): [#def128]
glib-2.84.1/girepository/cmph/bmz.c:501: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz
#  499|   	nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f);
#  500|   	bmz->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1));
#  501|-> 	bmz->hashes[nhashes] = NULL;
#  502|   	DEBUGP("Reading %u hashes\n", nhashes);
#  503|   	for (i = 0; i < nhashes; ++i)

Error: CPPCHECK_WARNING (CWE-476): [#def129]
glib-2.84.1/girepository/cmph/bmz.c:509: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  507|   		DEBUGP("Hash state has %u bytes\n", buflen);
#  508|   		buf = (char *)malloc((size_t)buflen);
#  509|-> 		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  510|   		state = hash_state_load(buf, buflen);
#  511|   		bmz->hashes[i] = state;

Error: CPPCHECK_WARNING (CWE-476): [#def130]
glib-2.84.1/girepository/cmph/bmz.c:511: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz
#  509|   		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  510|   		state = hash_state_load(buf, buflen);
#  511|-> 		bmz->hashes[i] = state;
#  512|   		free(buf);
#  513|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def131]
glib-2.84.1/girepository/cmph/bmz.c:519: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz
#  517|   	nbytes = fread(&(bmz->m), sizeof(cmph_uint32), (size_t)1, f);	
#  518|   
#  519|-> 	bmz->g = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*bmz->n);
#  520|   	nbytes = fread(bmz->g, bmz->n*sizeof(cmph_uint32), (size_t)1, f);
#  521|   	if (nbytes == 0 && ferror(f)) {

Error: CPPCHECK_WARNING (CWE-476): [#def132]
glib-2.84.1/girepository/cmph/bmz.c:520: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz
#  518|   
#  519|   	bmz->g = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*bmz->n);
#  520|-> 	nbytes = fread(bmz->g, bmz->n*sizeof(cmph_uint32), (size_t)1, f);
#  521|   	if (nbytes == 0 && ferror(f)) {
#  522|             fprintf(stderr, "ERROR: %s\n", strerror(errno));

Error: CPPCHECK_WARNING (CWE-476): [#def133]
glib-2.84.1/girepository/cmph/bmz8.c:142: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: visited
#  140|   	  DEBUGP("Searching step\n");
#  141|   	  visited = (cmph_uint8 *)malloc((size_t)bmz8->n/8 + 1);
#  142|-> 	  memset(visited, 0, (size_t)bmz8->n/8 + 1);
#  143|   	  used_edges = (cmph_uint8 *)malloc((size_t)bmz8->m/8 + 1);
#  144|   	  memset(used_edges, 0, (size_t)bmz8->m/8 + 1);

Error: CPPCHECK_WARNING (CWE-476): [#def134]
glib-2.84.1/girepository/cmph/bmz8.c:144: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: used_edges
#  142|   	  memset(visited, 0, (size_t)bmz8->n/8 + 1);
#  143|   	  used_edges = (cmph_uint8 *)malloc((size_t)bmz8->m/8 + 1);
#  144|-> 	  memset(used_edges, 0, (size_t)bmz8->m/8 + 1);
#  145|   	  free(bmz8->g);
#  146|   	  bmz8->g = (cmph_uint8 *)calloc((size_t)bmz8->n, sizeof(cmph_uint8));

Error: CPPCHECK_WARNING (CWE-476): [#def135]
glib-2.84.1/girepository/cmph/bmz8.c:182: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  180|   	}
#  181|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  182|-> 	mphf->algo = mph->algo;
#  183|   	bmz8f = (bmz8_data_t *)malloc(sizeof(bmz8_data_t));
#  184|   	bmz8f->g = bmz8->g;

Error: CPPCHECK_WARNING (CWE-476): [#def136]
glib-2.84.1/girepository/cmph/bmz8.c:184: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz8f
#  182|   	mphf->algo = mph->algo;
#  183|   	bmz8f = (bmz8_data_t *)malloc(sizeof(bmz8_data_t));
#  184|-> 	bmz8f->g = bmz8->g;
#  185|   	bmz8->g = NULL; //transfer memory ownership
#  186|   	bmz8f->hashes = bmz8->hashes;

Error: CPPCHECK_WARNING (CWE-476): [#def137]
glib-2.84.1/girepository/cmph/bmz8.c:186: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz8f
#  184|   	bmz8f->g = bmz8->g;
#  185|   	bmz8->g = NULL; //transfer memory ownership
#  186|-> 	bmz8f->hashes = bmz8->hashes;
#  187|   	bmz8->hashes = NULL; //transfer memory ownership
#  188|   	bmz8f->n = bmz8->n;

Error: CPPCHECK_WARNING (CWE-476): [#def138]
glib-2.84.1/girepository/cmph/bmz8.c:188: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz8f
#  186|   	bmz8f->hashes = bmz8->hashes;
#  187|   	bmz8->hashes = NULL; //transfer memory ownership
#  188|-> 	bmz8f->n = bmz8->n;
#  189|   	bmz8f->m = bmz8->m;
#  190|   	mphf->data = bmz8f;

Error: CPPCHECK_WARNING (CWE-476): [#def139]
glib-2.84.1/girepository/cmph/bmz8.c:189: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz8f
#  187|   	bmz8->hashes = NULL; //transfer memory ownership
#  188|   	bmz8f->n = bmz8->n;
#  189|-> 	bmz8f->m = bmz8->m;
#  190|   	mphf->data = bmz8f;
#  191|   	mphf->size = bmz8->m;

Error: CPPCHECK_WARNING (CWE-476): [#def140]
glib-2.84.1/girepository/cmph/bmz8.c:190: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  188|   	bmz8f->n = bmz8->n;
#  189|   	bmz8f->m = bmz8->m;
#  190|-> 	mphf->data = bmz8f;
#  191|   	mphf->size = bmz8->m;
#  192|   	DEBUGP("Successfully generated minimal perfect hash\n");

Error: CPPCHECK_WARNING (CWE-476): [#def141]
glib-2.84.1/girepository/cmph/bmz8.c:191: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  189|   	bmz8f->m = bmz8->m;
#  190|   	mphf->data = bmz8f;
#  191|-> 	mphf->size = bmz8->m;
#  192|   	DEBUGP("Successfully generated minimal perfect hash\n");
#  193|   	if (mph->verbosity)

Error: CPPCHECK_WARNING (CWE-401): [#def142]
glib-2.84.1/girepository/cmph/bmz8.c:330: error[memleakOnRealloc]: Common realloc mistake: 'unused_g_values' nulled but not freed upon failure
#  328|   					        if(nunused_g_values == unused_g_values_capacity)
#  329|   						{
#  330|-> 							unused_g_values = (cmph_uint8*)realloc(unused_g_values, ((size_t)(unused_g_values_capacity + BUFSIZ))*sizeof(cmph_uint8));
#  331|   						        unused_g_values_capacity += (cmph_uint8)BUFSIZ;  							
#  332|   						} 

Error: CPPCHECK_WARNING (CWE-476): [#def143]
glib-2.84.1/girepository/cmph/bmz8.c:510: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz8
#  508|   	mphf->data = bmz8;
#  509|   	nbytes = fread(&nhashes, sizeof(cmph_uint8), (size_t)1, f);
#  510|-> 	bmz8->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(size_t)(nhashes + 1));
#  511|   	bmz8->hashes[nhashes] = NULL;
#  512|   	DEBUGP("Reading %u hashes\n", nhashes);

Error: CPPCHECK_WARNING (CWE-476): [#def144]
glib-2.84.1/girepository/cmph/bmz8.c:511: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz8
#  509|   	nbytes = fread(&nhashes, sizeof(cmph_uint8), (size_t)1, f);
#  510|   	bmz8->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(size_t)(nhashes + 1));
#  511|-> 	bmz8->hashes[nhashes] = NULL;
#  512|   	DEBUGP("Reading %u hashes\n", nhashes);
#  513|   	for (i = 0; i < nhashes; ++i)

Error: CPPCHECK_WARNING (CWE-476): [#def145]
glib-2.84.1/girepository/cmph/bmz8.c:519: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  517|   		DEBUGP("Hash state has %u bytes\n", buflen);
#  518|   		buf = (char *)malloc((size_t)buflen);
#  519|-> 		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  520|   		state = hash_state_load(buf, buflen);
#  521|   		bmz8->hashes[i] = state;

Error: CPPCHECK_WARNING (CWE-476): [#def146]
glib-2.84.1/girepository/cmph/bmz8.c:521: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz8
#  519|   		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  520|   		state = hash_state_load(buf, buflen);
#  521|-> 		bmz8->hashes[i] = state;
#  522|   		free(buf);
#  523|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def147]
glib-2.84.1/girepository/cmph/bmz8.c:529: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz8
#  527|   	nbytes = fread(&(bmz8->m), sizeof(cmph_uint8), (size_t)1, f);	
#  528|   
#  529|-> 	bmz8->g = (cmph_uint8 *)malloc(sizeof(cmph_uint8)*bmz8->n);
#  530|   	nbytes = fread(bmz8->g, bmz8->n*sizeof(cmph_uint8), (size_t)1, f);
#  531|   	if (nbytes == 0 && ferror(f)) {

Error: CPPCHECK_WARNING (CWE-476): [#def148]
glib-2.84.1/girepository/cmph/bmz8.c:530: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bmz8
#  528|   
#  529|   	bmz8->g = (cmph_uint8 *)malloc(sizeof(cmph_uint8)*bmz8->n);
#  530|-> 	nbytes = fread(bmz8->g, bmz8->n*sizeof(cmph_uint8), (size_t)1, f);
#  531|   	if (nbytes == 0 && ferror(f)) {
#  532|             fprintf(stderr, "ERROR: %s\n", strerror(errno));

Error: CPPCHECK_WARNING (CWE-476): [#def149]
glib-2.84.1/girepository/cmph/brz.c:34: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   32|   	brz_config_data_t *brz = NULL; 	
#   33|   	brz = (brz_config_data_t *)malloc(sizeof(brz_config_data_t));
#   34|-> 	brz->algo = CMPH_FCH;
#   35|   	brz->b = 128;
#   36|   	brz->hashfuncs[0] = CMPH_HASH_JENKINS;

Error: CPPCHECK_WARNING (CWE-476): [#def150]
glib-2.84.1/girepository/cmph/brz.c:35: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   33|   	brz = (brz_config_data_t *)malloc(sizeof(brz_config_data_t));
#   34|   	brz->algo = CMPH_FCH;
#   35|-> 	brz->b = 128;
#   36|   	brz->hashfuncs[0] = CMPH_HASH_JENKINS;
#   37|   	brz->hashfuncs[1] = CMPH_HASH_JENKINS;

Error: CPPCHECK_WARNING (CWE-476): [#def151]
glib-2.84.1/girepository/cmph/brz.c:36: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   34|   	brz->algo = CMPH_FCH;
#   35|   	brz->b = 128;
#   36|-> 	brz->hashfuncs[0] = CMPH_HASH_JENKINS;
#   37|   	brz->hashfuncs[1] = CMPH_HASH_JENKINS;
#   38|   	brz->hashfuncs[2] = CMPH_HASH_JENKINS;

Error: CPPCHECK_WARNING (CWE-476): [#def152]
glib-2.84.1/girepository/cmph/brz.c:37: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   35|   	brz->b = 128;
#   36|   	brz->hashfuncs[0] = CMPH_HASH_JENKINS;
#   37|-> 	brz->hashfuncs[1] = CMPH_HASH_JENKINS;
#   38|   	brz->hashfuncs[2] = CMPH_HASH_JENKINS;
#   39|   	brz->size   = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def153]
glib-2.84.1/girepository/cmph/brz.c:38: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   36|   	brz->hashfuncs[0] = CMPH_HASH_JENKINS;
#   37|   	brz->hashfuncs[1] = CMPH_HASH_JENKINS;
#   38|-> 	brz->hashfuncs[2] = CMPH_HASH_JENKINS;
#   39|   	brz->size   = NULL;
#   40|   	brz->offset = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def154]
glib-2.84.1/girepository/cmph/brz.c:39: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   37|   	brz->hashfuncs[1] = CMPH_HASH_JENKINS;
#   38|   	brz->hashfuncs[2] = CMPH_HASH_JENKINS;
#   39|-> 	brz->size   = NULL;
#   40|   	brz->offset = NULL;
#   41|   	brz->g      = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def155]
glib-2.84.1/girepository/cmph/brz.c:40: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   38|   	brz->hashfuncs[2] = CMPH_HASH_JENKINS;
#   39|   	brz->size   = NULL;
#   40|-> 	brz->offset = NULL;
#   41|   	brz->g      = NULL;
#   42|   	brz->h1 = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def156]
glib-2.84.1/girepository/cmph/brz.c:41: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   39|   	brz->size   = NULL;
#   40|   	brz->offset = NULL;
#   41|-> 	brz->g      = NULL;
#   42|   	brz->h1 = NULL;
#   43|   	brz->h2 = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def157]
glib-2.84.1/girepository/cmph/brz.c:42: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   40|   	brz->offset = NULL;
#   41|   	brz->g      = NULL;
#   42|-> 	brz->h1 = NULL;
#   43|   	brz->h2 = NULL;
#   44|   	brz->h0 = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def158]
glib-2.84.1/girepository/cmph/brz.c:43: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   41|   	brz->g      = NULL;
#   42|   	brz->h1 = NULL;
#   43|-> 	brz->h2 = NULL;
#   44|   	brz->h0 = NULL;
#   45|   	brz->memory_availability = 1024*1024;

Error: CPPCHECK_WARNING (CWE-476): [#def159]
glib-2.84.1/girepository/cmph/brz.c:44: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   42|   	brz->h1 = NULL;
#   43|   	brz->h2 = NULL;
#   44|-> 	brz->h0 = NULL;
#   45|   	brz->memory_availability = 1024*1024;
#   46|   	brz->tmp_dir = (cmph_uint8 *)calloc((size_t)10, sizeof(cmph_uint8));

Error: CPPCHECK_WARNING (CWE-476): [#def160]
glib-2.84.1/girepository/cmph/brz.c:45: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   43|   	brz->h2 = NULL;
#   44|   	brz->h0 = NULL;
#   45|-> 	brz->memory_availability = 1024*1024;
#   46|   	brz->tmp_dir = (cmph_uint8 *)calloc((size_t)10, sizeof(cmph_uint8));
#   47|   	brz->mphf_fd = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def161]
glib-2.84.1/girepository/cmph/brz.c:46: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   44|   	brz->h0 = NULL;
#   45|   	brz->memory_availability = 1024*1024;
#   46|-> 	brz->tmp_dir = (cmph_uint8 *)calloc((size_t)10, sizeof(cmph_uint8));
#   47|   	brz->mphf_fd = NULL;
#   48|   	strcpy((char *)(brz->tmp_dir), "/var/tmp/"); 

Error: CPPCHECK_WARNING (CWE-476): [#def162]
glib-2.84.1/girepository/cmph/brz.c:47: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   45|   	brz->memory_availability = 1024*1024;
#   46|   	brz->tmp_dir = (cmph_uint8 *)calloc((size_t)10, sizeof(cmph_uint8));
#   47|-> 	brz->mphf_fd = NULL;
#   48|   	strcpy((char *)(brz->tmp_dir), "/var/tmp/"); 
#   49|   	assert(brz);

Error: CPPCHECK_WARNING (CWE-476): [#def163]
glib-2.84.1/girepository/cmph/brz.c:48: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#   46|   	brz->tmp_dir = (cmph_uint8 *)calloc((size_t)10, sizeof(cmph_uint8));
#   47|   	brz->mphf_fd = NULL;
#   48|-> 	strcpy((char *)(brz->tmp_dir), "/var/tmp/"); 
#   49|   	assert(brz);
#   50|   	return brz;

Error: CPPCHECK_WARNING (CWE-476): [#def164]
glib-2.84.1/girepository/cmph/brz.c:197: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  195|   	// Generating a mphf
#  196|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  197|-> 	mphf->algo = mph->algo;
#  198|   	brzf = (brz_data_t *)malloc(sizeof(brz_data_t));
#  199|   	brzf->g = brz->g;

Error: CPPCHECK_WARNING (CWE-476): [#def165]
glib-2.84.1/girepository/cmph/brz.c:199: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brzf
#  197|   	mphf->algo = mph->algo;
#  198|   	brzf = (brz_data_t *)malloc(sizeof(brz_data_t));
#  199|-> 	brzf->g = brz->g;
#  200|   	brz->g = NULL; //transfer memory ownership
#  201|   	brzf->h1 = brz->h1;

Error: CPPCHECK_WARNING (CWE-476): [#def166]
glib-2.84.1/girepository/cmph/brz.c:201: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brzf
#  199|   	brzf->g = brz->g;
#  200|   	brz->g = NULL; //transfer memory ownership
#  201|-> 	brzf->h1 = brz->h1;
#  202|   	brz->h1 = NULL; //transfer memory ownership
#  203|   	brzf->h2 = brz->h2;

Error: CPPCHECK_WARNING (CWE-476): [#def167]
glib-2.84.1/girepository/cmph/brz.c:203: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brzf
#  201|   	brzf->h1 = brz->h1;
#  202|   	brz->h1 = NULL; //transfer memory ownership
#  203|-> 	brzf->h2 = brz->h2;
#  204|   	brz->h2 = NULL; //transfer memory ownership
#  205|   	brzf->h0 = brz->h0;

Error: CPPCHECK_WARNING (CWE-476): [#def168]
glib-2.84.1/girepository/cmph/brz.c:205: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brzf
#  203|   	brzf->h2 = brz->h2;
#  204|   	brz->h2 = NULL; //transfer memory ownership
#  205|-> 	brzf->h0 = brz->h0;
#  206|   	brz->h0 = NULL; //transfer memory ownership
#  207|   	brzf->size = brz->size;

Error: CPPCHECK_WARNING (CWE-476): [#def169]
glib-2.84.1/girepository/cmph/brz.c:207: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brzf
#  205|   	brzf->h0 = brz->h0;
#  206|   	brz->h0 = NULL; //transfer memory ownership
#  207|-> 	brzf->size = brz->size;
#  208|   	brz->size = NULL; //transfer memory ownership
#  209|   	brzf->offset = brz->offset;

Error: CPPCHECK_WARNING (CWE-476): [#def170]
glib-2.84.1/girepository/cmph/brz.c:209: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brzf
#  207|   	brzf->size = brz->size;
#  208|   	brz->size = NULL; //transfer memory ownership
#  209|-> 	brzf->offset = brz->offset;
#  210|   	brz->offset = NULL; //transfer memory ownership
#  211|   	brzf->k = brz->k;

Error: CPPCHECK_WARNING (CWE-476): [#def171]
glib-2.84.1/girepository/cmph/brz.c:211: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brzf
#  209|   	brzf->offset = brz->offset;
#  210|   	brz->offset = NULL; //transfer memory ownership
#  211|-> 	brzf->k = brz->k;
#  212|   	brzf->c = brz->c;
#  213|   	brzf->m = brz->m;

Error: CPPCHECK_WARNING (CWE-476): [#def172]
glib-2.84.1/girepository/cmph/brz.c:212: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brzf
#  210|   	brz->offset = NULL; //transfer memory ownership
#  211|   	brzf->k = brz->k;
#  212|-> 	brzf->c = brz->c;
#  213|   	brzf->m = brz->m;
#  214|   	brzf->algo = brz->algo;

Error: CPPCHECK_WARNING (CWE-476): [#def173]
glib-2.84.1/girepository/cmph/brz.c:213: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brzf
#  211|   	brzf->k = brz->k;
#  212|   	brzf->c = brz->c;
#  213|-> 	brzf->m = brz->m;
#  214|   	brzf->algo = brz->algo;
#  215|   	mphf->data = brzf;

Error: CPPCHECK_WARNING (CWE-476): [#def174]
glib-2.84.1/girepository/cmph/brz.c:214: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brzf
#  212|   	brzf->c = brz->c;
#  213|   	brzf->m = brz->m;
#  214|-> 	brzf->algo = brz->algo;
#  215|   	mphf->data = brzf;
#  216|   	mphf->size = brz->m;	

Error: CPPCHECK_WARNING (CWE-476): [#def175]
glib-2.84.1/girepository/cmph/brz.c:215: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  213|   	brzf->m = brz->m;
#  214|   	brzf->algo = brz->algo;
#  215|-> 	mphf->data = brzf;
#  216|   	mphf->size = brz->m;	
#  217|   	DEBUGP("Successfully generated minimal perfect hash\n");

Error: CPPCHECK_WARNING (CWE-476): [#def176]
glib-2.84.1/girepository/cmph/brz.c:216: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  214|   	brzf->algo = brz->algo;
#  215|   	mphf->data = brzf;
#  216|-> 	mphf->size = brz->m;	
#  217|   	DEBUGP("Successfully generated minimal perfect hash\n");
#  218|   	if (mph->verbosity)

Error: CPPCHECK_WARNING (CWE-476): [#def177]
glib-2.84.1/girepository/cmph/brz.c:281: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: keys_index
#  279|   				memcpy(&keylen1, buffer + memory_usage, sizeof(keylen1));
#  280|   				h0 = hash(brz->h0, (char *)(buffer + memory_usage + sizeof(keylen1)), keylen1) % brz->k;
#  281|-> 				keys_index[buckets_size[h0]] = memory_usage;
#  282|   				buckets_size[h0]++;
#  283|   				memory_usage +=  keylen1 + (cmph_uint32)sizeof(keylen1);

Error: CPPCHECK_WARNING (CWE-476): [#def178]
glib-2.84.1/girepository/cmph/brz.c:292: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: keys_index
#  290|   			for(i = 0; i < nkeys_in_buffer; i++)
#  291|   			{
#  292|-> 				memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1));
#  293|   				nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd);
#  294|   			}

Error: CPPCHECK_WARNING (CWE-476): [#def179]
glib-2.84.1/girepository/cmph/brz.c:293: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: keys_index
#  291|   			{
#  292|   				memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1));
#  293|-> 				nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd);
#  294|   			}
#  295|   			nkeys_in_buffer = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def180]
glib-2.84.1/girepository/cmph/brz.c:293: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: tmp_fd
#  291|   			{
#  292|   				memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1));
#  293|-> 				nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd);
#  294|   			}
#  295|   			nkeys_in_buffer = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def181]
glib-2.84.1/girepository/cmph/brz.c:300: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: tmp_fd
#  298|   			nflushes++;
#  299|   			free(keys_index);
#  300|-> 			fclose(tmp_fd);
#  301|   		}
#  302|   		memcpy(buffer + memory_usage, &keylen, sizeof(keylen));

Error: CPPCHECK_WARNING (CWE-476): [#def182]
glib-2.84.1/girepository/cmph/brz.c:343: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: keys_index
#  341|   			memcpy(&keylen1, buffer + memory_usage, sizeof(keylen1));
#  342|   			h0 = hash(brz->h0, (char *)(buffer + memory_usage + sizeof(keylen1)), keylen1) % brz->k;
#  343|-> 			keys_index[buckets_size[h0]] = memory_usage;
#  344|   			buckets_size[h0]++;
#  345|   			memory_usage +=  keylen1 + (cmph_uint32)sizeof(keylen1);

Error: CPPCHECK_WARNING (CWE-476): [#def183]
glib-2.84.1/girepository/cmph/brz.c:354: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: keys_index
#  352|   		for(i = 0; i < nkeys_in_buffer; i++)
#  353|   		{
#  354|-> 			memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1));
#  355|   			nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd);
#  356|   		}

Error: CPPCHECK_WARNING (CWE-476): [#def184]
glib-2.84.1/girepository/cmph/brz.c:355: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: keys_index
#  353|   		{
#  354|   			memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1));
#  355|-> 			nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd);
#  356|   		}
#  357|   		nkeys_in_buffer = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def185]
glib-2.84.1/girepository/cmph/brz.c:355: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: tmp_fd
#  353|   		{
#  354|   			memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1));
#  355|-> 			nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd);
#  356|   		}
#  357|   		nkeys_in_buffer = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def186]
glib-2.84.1/girepository/cmph/brz.c:362: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: tmp_fd
#  360|   		nflushes++;
#  361|   		free(keys_index);
#  362|-> 		fclose(tmp_fd);
#  363|   	}
#  364|   

Error: CPPCHECK_WARNING (CWE-476): [#def187]
glib-2.84.1/girepository/cmph/brz.c:400: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buffer_h0
#  398|   		key = (char *)buffer_manager_read_key(buff_manager, i, &keylen);
#  399|   		h0 = hash(brz->h0, key+sizeof(keylen), keylen) % brz->k;
#  400|-> 		buffer_h0[i] = h0;
#  401|                   buffer_merge[i] = (cmph_uint8 *)key;
#  402|                   key = NULL; //transfer memory ownership                 

Error: CPPCHECK_WARNING (CWE-476): [#def188]
glib-2.84.1/girepository/cmph/brz.c:401: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buffer_merge
#  399|   		h0 = hash(brz->h0, key+sizeof(keylen), keylen) % brz->k;
#  400|   		buffer_h0[i] = h0;
#  401|->                 buffer_merge[i] = (cmph_uint8 *)key;
#  402|                   key = NULL; //transfer memory ownership                 
#  403|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def189]
glib-2.84.1/girepository/cmph/brz.c:411: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buffer_h0
#  409|   	{
#  410|   		i = brz_min_index(buffer_h0, nflushes);
#  411|-> 		cur_bucket = buffer_h0[i];
#  412|   		key = (char *)buffer_manager_read_key(buff_manager, i, &keylen);
#  413|   		if(key)

Error: CPPCHECK_WARNING (CWE-476): [#def190]
glib-2.84.1/girepository/cmph/brz.c:515: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vector
#  513|   	for(i = 1; i < n; i++)
#  514|   	{
#  515|-> 		if(vector[i] < vector[min_index]) min_index = i;
#  516|   	}
#  517|   	return min_index;

Error: CPPCHECK_WARNING (CWE-476): [#def191]
glib-2.84.1/girepository/cmph/brz.c:539: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  537|   	*buflen = buflenh1 + buflenh2 + n + 2U * (cmph_uint32)sizeof(cmph_uint32);
#  538|   	buf = (char *)malloc((size_t)(*buflen));
#  539|-> 	memcpy(buf, &buflenh1, sizeof(cmph_uint32));
#  540|   	memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
#  541|   	memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));

Error: CPPCHECK_WARNING (CWE-682): [#def192]
glib-2.84.1/girepository/cmph/brz.c:540: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  538|   	buf = (char *)malloc((size_t)(*buflen));
#  539|   	memcpy(buf, &buflenh1, sizeof(cmph_uint32));
#  540|-> 	memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
#  541|   	memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));
#  542|   	memcpy(buf+2*sizeof(cmph_uint32)+buflenh1, bufh2, (size_t)buflenh2);	

Error: CPPCHECK_WARNING (CWE-682): [#def193]
glib-2.84.1/girepository/cmph/brz.c:541: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  539|   	memcpy(buf, &buflenh1, sizeof(cmph_uint32));
#  540|   	memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
#  541|-> 	memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));
#  542|   	memcpy(buf+2*sizeof(cmph_uint32)+buflenh1, bufh2, (size_t)buflenh2);	
#  543|   	for (i = 0; i < n; i++) memcpy(buf+2*sizeof(cmph_uint32)+buflenh1+buflenh2+i,(fchf->g + i), (size_t)1);

Error: CPPCHECK_WARNING (CWE-682): [#def194]
glib-2.84.1/girepository/cmph/brz.c:542: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  540|   	memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
#  541|   	memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));
#  542|-> 	memcpy(buf+2*sizeof(cmph_uint32)+buflenh1, bufh2, (size_t)buflenh2);	
#  543|   	for (i = 0; i < n; i++) memcpy(buf+2*sizeof(cmph_uint32)+buflenh1+buflenh2+i,(fchf->g + i), (size_t)1);
#  544|   	free(bufh1);

Error: CPPCHECK_WARNING (CWE-682): [#def195]
glib-2.84.1/girepository/cmph/brz.c:543: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  541|   	memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));
#  542|   	memcpy(buf+2*sizeof(cmph_uint32)+buflenh1, bufh2, (size_t)buflenh2);	
#  543|-> 	for (i = 0; i < n; i++) memcpy(buf+2*sizeof(cmph_uint32)+buflenh1+buflenh2+i,(fchf->g + i), (size_t)1);
#  544|   	free(bufh1);
#  545|   	free(bufh2);

Error: CPPCHECK_WARNING (CWE-476): [#def196]
glib-2.84.1/girepository/cmph/brz.c:560: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  558|   	*buflen = buflenh1 + buflenh2 + n + 2U * (cmph_uint32)sizeof(cmph_uint32);
#  559|   	buf = (char *)malloc((size_t)(*buflen));
#  560|-> 	memcpy(buf, &buflenh1, sizeof(cmph_uint32));
#  561|   	memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
#  562|   	memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));

Error: CPPCHECK_WARNING (CWE-682): [#def197]
glib-2.84.1/girepository/cmph/brz.c:561: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  559|   	buf = (char *)malloc((size_t)(*buflen));
#  560|   	memcpy(buf, &buflenh1, sizeof(cmph_uint32));
#  561|-> 	memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
#  562|   	memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));
#  563|   	memcpy(buf+2*sizeof(cmph_uint32)+buflenh1, bufh2, (size_t)buflenh2);

Error: CPPCHECK_WARNING (CWE-682): [#def198]
glib-2.84.1/girepository/cmph/brz.c:562: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  560|   	memcpy(buf, &buflenh1, sizeof(cmph_uint32));
#  561|   	memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
#  562|-> 	memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));
#  563|   	memcpy(buf+2*sizeof(cmph_uint32)+buflenh1, bufh2, (size_t)buflenh2);
#  564|   	memcpy(buf+2*sizeof(cmph_uint32)+buflenh1+buflenh2,bmzf->g, (size_t)n);

Error: CPPCHECK_WARNING (CWE-682): [#def199]
glib-2.84.1/girepository/cmph/brz.c:563: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  561|   	memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
#  562|   	memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));
#  563|-> 	memcpy(buf+2*sizeof(cmph_uint32)+buflenh1, bufh2, (size_t)buflenh2);
#  564|   	memcpy(buf+2*sizeof(cmph_uint32)+buflenh1+buflenh2,bmzf->g, (size_t)n);
#  565|   	free(bufh1);

Error: CPPCHECK_WARNING (CWE-682): [#def200]
glib-2.84.1/girepository/cmph/brz.c:564: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  562|   	memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));
#  563|   	memcpy(buf+2*sizeof(cmph_uint32)+buflenh1, bufh2, (size_t)buflenh2);
#  564|-> 	memcpy(buf+2*sizeof(cmph_uint32)+buflenh1+buflenh2,bmzf->g, (size_t)n);
#  565|   	free(bufh1);
#  566|   	free(bufh2);

Error: CPPCHECK_WARNING (CWE-476): [#def201]
glib-2.84.1/girepository/cmph/brz.c:608: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#  606|   	nbytes = fread(&(brz->algo), sizeof(brz->algo), (size_t)1, f); // Reading algo.
#  607|   	nbytes = fread(&(brz->k), sizeof(cmph_uint32), (size_t)1, f);
#  608|-> 	brz->size   = (cmph_uint8 *) malloc(sizeof(cmph_uint8)*brz->k);
#  609|   	nbytes = fread(brz->size, sizeof(cmph_uint8)*(brz->k), (size_t)1, f);	
#  610|   	brz->h1 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k);

Error: CPPCHECK_WARNING (CWE-476): [#def202]
glib-2.84.1/girepository/cmph/brz.c:609: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#  607|   	nbytes = fread(&(brz->k), sizeof(cmph_uint32), (size_t)1, f);
#  608|   	brz->size   = (cmph_uint8 *) malloc(sizeof(cmph_uint8)*brz->k);
#  609|-> 	nbytes = fread(brz->size, sizeof(cmph_uint8)*(brz->k), (size_t)1, f);	
#  610|   	brz->h1 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k);
#  611|   	brz->h2 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k);

Error: CPPCHECK_WARNING (CWE-476): [#def203]
glib-2.84.1/girepository/cmph/brz.c:610: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#  608|   	brz->size   = (cmph_uint8 *) malloc(sizeof(cmph_uint8)*brz->k);
#  609|   	nbytes = fread(brz->size, sizeof(cmph_uint8)*(brz->k), (size_t)1, f);	
#  610|-> 	brz->h1 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k);
#  611|   	brz->h2 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k);
#  612|   	brz->g  = (cmph_uint8 **)  calloc((size_t)brz->k, sizeof(cmph_uint8 *));

Error: CPPCHECK_WARNING (CWE-476): [#def204]
glib-2.84.1/girepository/cmph/brz.c:611: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#  609|   	nbytes = fread(brz->size, sizeof(cmph_uint8)*(brz->k), (size_t)1, f);	
#  610|   	brz->h1 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k);
#  611|-> 	brz->h2 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k);
#  612|   	brz->g  = (cmph_uint8 **)  calloc((size_t)brz->k, sizeof(cmph_uint8 *));
#  613|   	DEBUGP("Reading c = %f   k = %u   algo = %u \n", brz->c, brz->k, brz->algo);

Error: CPPCHECK_WARNING (CWE-476): [#def205]
glib-2.84.1/girepository/cmph/brz.c:612: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#  610|   	brz->h1 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k);
#  611|   	brz->h2 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k);
#  612|-> 	brz->g  = (cmph_uint8 **)  calloc((size_t)brz->k, sizeof(cmph_uint8 *));
#  613|   	DEBUGP("Reading c = %f   k = %u   algo = %u \n", brz->c, brz->k, brz->algo);
#  614|   	//loading h_i1, h_i2 and g_i.

Error: CPPCHECK_WARNING (CWE-476): [#def206]
glib-2.84.1/girepository/cmph/brz.c:615: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#  613|   	DEBUGP("Reading c = %f   k = %u   algo = %u \n", brz->c, brz->k, brz->algo);
#  614|   	//loading h_i1, h_i2 and g_i.
#  615|-> 	for(i = 0; i < brz->k; i++)
#  616|   	{
#  617|   		// h1

Error: CPPCHECK_WARNING (CWE-476): [#def207]
glib-2.84.1/girepository/cmph/brz.c:621: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  619|   		DEBUGP("Hash state 1 has %u bytes\n", buflen);
#  620|   		buf = (char *)malloc((size_t)buflen);
#  621|-> 		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  622|   		brz->h1[i] = hash_state_load(buf, buflen);
#  623|   		free(buf);

Error: CPPCHECK_WARNING (CWE-476): [#def208]
glib-2.84.1/girepository/cmph/brz.c:622: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#  620|   		buf = (char *)malloc((size_t)buflen);
#  621|   		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  622|-> 		brz->h1[i] = hash_state_load(buf, buflen);
#  623|   		free(buf);
#  624|   		//h2

Error: CPPCHECK_WARNING (CWE-476): [#def209]
glib-2.84.1/girepository/cmph/brz.c:628: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  626|   		DEBUGP("Hash state 2 has %u bytes\n", buflen);
#  627|   		buf = (char *)malloc((size_t)buflen);
#  628|-> 		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  629|   		brz->h2[i] = hash_state_load(buf, buflen);
#  630|   		free(buf);

Error: CPPCHECK_WARNING (CWE-476): [#def210]
glib-2.84.1/girepository/cmph/brz.c:629: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#  627|   		buf = (char *)malloc((size_t)buflen);
#  628|   		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  629|-> 		brz->h2[i] = hash_state_load(buf, buflen);
#  630|   		free(buf);
#  631|   		switch(brz->algo)

Error: CPPCHECK_WARNING (CWE-476): [#def211]
glib-2.84.1/girepository/cmph/brz.c:631: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: brz
#  629|   		brz->h2[i] = hash_state_load(buf, buflen);
#  630|   		free(buf);
#  631|-> 		switch(brz->algo)
#  632|   		{
#  633|   			case CMPH_FCH:

Error: CPPCHECK_WARNING (CWE-476): [#def212]
glib-2.84.1/girepository/cmph/brz.c:649: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  647|   	DEBUGP("Hash state has %u bytes\n", buflen);
#  648|   	buf = (char *)malloc((size_t)buflen);
#  649|-> 	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  650|   	brz->h0 = hash_state_load(buf, buflen);
#  651|   	free(buf);

Error: CPPCHECK_WARNING (CWE-476): [#def213]
glib-2.84.1/girepository/cmph/buffer_entry.c:78: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#   76|   	copied_bytes = 0;
#   77|   	buf = (cmph_uint8 *)malloc(*keylen + sizeof(*keylen));
#   78|->         memcpy(buf, keylen, sizeof(*keylen));
#   79|   	if((buffer_entry->pos + lacked_bytes) > buffer_entry->nbytes) {
#   80|   		copied_bytes = buffer_entry->nbytes - buffer_entry->pos;

Error: CPPCHECK_WARNING (CWE-476): [#def214]
glib-2.84.1/girepository/cmph/chd.c:146: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  144|   
#  145|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  146|-> 	mphf->algo = mph->algo;
#  147|   	chdf = (chd_data_t *)malloc(sizeof(chd_data_t));
#  148|   	

Error: CPPCHECK_WARNING (CWE-476): [#def215]
glib-2.84.1/girepository/cmph/chd.c:149: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chdf
#  147|   	chdf = (chd_data_t *)malloc(sizeof(chd_data_t));
#  148|   	
#  149|-> 	chdf->packed_cr = packed_cr;
#  150|   	packed_cr = NULL; //transfer memory ownership
#  151|   

Error: CPPCHECK_WARNING (CWE-476): [#def216]
glib-2.84.1/girepository/cmph/chd.c:152: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chdf
#  150|   	packed_cr = NULL; //transfer memory ownership
#  151|   
#  152|-> 	chdf->packed_chd_phf = packed_chd_phf;
#  153|   	packed_chd_phf = NULL; //transfer memory ownership
#  154|   	

Error: CPPCHECK_WARNING (CWE-476): [#def217]
glib-2.84.1/girepository/cmph/chd.c:155: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chdf
#  153|   	packed_chd_phf = NULL; //transfer memory ownership
#  154|   	
#  155|-> 	chdf->packed_chd_phf_size = packed_chd_phf_size;
#  156|   	chdf->packed_cr_size = packed_cr_size;
#  157|   	

Error: CPPCHECK_WARNING (CWE-476): [#def218]
glib-2.84.1/girepository/cmph/chd.c:156: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chdf
#  154|   	
#  155|   	chdf->packed_chd_phf_size = packed_chd_phf_size;
#  156|-> 	chdf->packed_cr_size = packed_cr_size;
#  157|   	
#  158|   	mphf->data = chdf;

Error: CPPCHECK_WARNING (CWE-476): [#def219]
glib-2.84.1/girepository/cmph/chd.c:158: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  156|   	chdf->packed_cr_size = packed_cr_size;
#  157|   	
#  158|-> 	mphf->data = chdf;
#  159|   	mphf->size = nkeys;
#  160|   

Error: CPPCHECK_WARNING (CWE-476): [#def220]
glib-2.84.1/girepository/cmph/chd.c:159: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  157|   	
#  158|   	mphf->data = chdf;
#  159|-> 	mphf->size = nkeys;
#  160|   
#  161|   	DEBUGP("Successfully generated minimal perfect hash\n");

Error: CPPCHECK_WARNING (CWE-476): [#def221]
glib-2.84.1/girepository/cmph/chd.c:186: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chd
#  184|   	nbytes = fread(&chd->packed_chd_phf_size, sizeof(cmph_uint32), (size_t)1, fd);
#  185|   	DEBUGP("Loading CHD_PH perfect hash function with %u bytes to disk\n", chd->packed_chd_phf_size);
#  186|-> 	chd->packed_chd_phf = (cmph_uint8 *) calloc((size_t)chd->packed_chd_phf_size,(size_t)1);
#  187|   	nbytes = fread(chd->packed_chd_phf, chd->packed_chd_phf_size, (size_t)1, fd);
#  188|   

Error: CPPCHECK_WARNING (CWE-476): [#def222]
glib-2.84.1/girepository/cmph/chd.c:187: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chd
#  185|   	DEBUGP("Loading CHD_PH perfect hash function with %u bytes to disk\n", chd->packed_chd_phf_size);
#  186|   	chd->packed_chd_phf = (cmph_uint8 *) calloc((size_t)chd->packed_chd_phf_size,(size_t)1);
#  187|-> 	nbytes = fread(chd->packed_chd_phf, chd->packed_chd_phf_size, (size_t)1, fd);
#  188|   
#  189|   	nbytes = fread(&chd->packed_cr_size, sizeof(cmph_uint32), (size_t)1, fd);

Error: CPPCHECK_WARNING (CWE-476): [#def223]
glib-2.84.1/girepository/cmph/chd.c:191: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chd
#  189|   	nbytes = fread(&chd->packed_cr_size, sizeof(cmph_uint32), (size_t)1, fd);
#  190|   	DEBUGP("Loading Compressed rank structure, which has %u bytes\n", chd->packed_cr_size);
#  191|-> 	chd->packed_cr = (cmph_uint8 *) calloc((size_t)chd->packed_cr_size, (size_t)1);
#  192|   	nbytes = fread(chd->packed_cr, chd->packed_cr_size, (size_t)1, fd);
#  193|   	if (nbytes == 0 && ferror(fd)) {

Error: CPPCHECK_WARNING (CWE-476): [#def224]
glib-2.84.1/girepository/cmph/chd.c:192: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chd
#  190|   	DEBUGP("Loading Compressed rank structure, which has %u bytes\n", chd->packed_cr_size);
#  191|   	chd->packed_cr = (cmph_uint8 *) calloc((size_t)chd->packed_cr_size, (size_t)1);
#  192|-> 	nbytes = fread(chd->packed_cr, chd->packed_cr_size, (size_t)1, fd);
#  193|   	if (nbytes == 0 && ferror(fd)) {
#  194|             fprintf(stderr, "ERROR: %s\n", strerror(errno));

Error: CPPCHECK_WARNING (CWE-476): [#def225]
glib-2.84.1/girepository/cmph/chd_ph.c:133: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: probe_counts
#  131|   	for(i = 0; i < n; i++)
#  132|   	{
#  133|-> 		probe_counts[disp_table[i]]++;
#  134|   	};
#  135|   	

Error: CPPCHECK_WARNING (CWE-476): [#def226]
glib-2.84.1/girepository/cmph/chd_ph.c:138: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: probe_counts
#  136|   	for(i = 0; i < max_probes; i++)
#  137|   	{
#  138|-> 		if(probe_counts[i] > 0)
#  139|   			entropy -= probe_counts[i]*log((double)probe_counts[i]/(double)n)/log(2);
#  140|   	};

Error: CPPCHECK_WARNING (CWE-476): [#def227]
glib-2.84.1/girepository/cmph/chd_ph.c:312: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: sorted_lists
#  310|   		if(bucket_size == 0)
#  311|   			continue;
#  312|-> 		sorted_lists[bucket_size].size++;
#  313|   	};
#  314|   	sorted_lists[1].buckets_list = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def228]
glib-2.84.1/girepository/cmph/chd_ph.c:314: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: sorted_lists
#  312|   		sorted_lists[bucket_size].size++;
#  313|   	};
#  314|-> 	sorted_lists[1].buckets_list = 0;
#  315|   	// Determine final position of list of buckets into the contiguous array that will store all the buckets
#  316|   	for(i = 2; i <= max_bucket_size; i++)

Error: CPPCHECK_WARNING (CWE-476): [#def229]
glib-2.84.1/girepository/cmph/chd_ph.c:335: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: output_buckets
#  333|   		};
#  334|   		position = sorted_lists[bucket_size].buckets_list + sorted_lists[bucket_size].size;
#  335|-> 		output_buckets[position].bucket_id = i;
#  336|   		output_buckets[position].items_list = input_buckets[i].items_list;
#  337|   		sorted_lists[bucket_size].size++;

Error: CPPCHECK_WARNING (CWE-476): [#def230]
glib-2.84.1/girepository/cmph/chd_ph.c:336: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: output_buckets
#  334|   		position = sorted_lists[bucket_size].buckets_list + sorted_lists[bucket_size].size;
#  335|   		output_buckets[position].bucket_id = i;
#  336|-> 		output_buckets[position].items_list = input_buckets[i].items_list;
#  337|   		sorted_lists[bucket_size].size++;
#  338|   	};

Error: CPPCHECK_WARNING (CWE-476): [#def231]
glib-2.84.1/girepository/cmph/chd_ph.c:358: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: output_items
#  356|   			for(j = 0; j < bucket_size; j++)
#  357|   			{
#  358|-> 				output_items[position].f = input_items[position2].f;
#  359|   				output_items[position].h = input_items[position2].h;
#  360|   				position++;

Error: CPPCHECK_WARNING (CWE-476): [#def232]
glib-2.84.1/girepository/cmph/chd_ph.c:359: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: output_items
#  357|   			{
#  358|   				output_items[position].f = input_items[position2].f;
#  359|-> 				output_items[position].h = input_items[position2].h;
#  360|   				position++;
#  361|   				position2++;

Error: CPPCHECK_WARNING (CWE-476): [#def233]
glib-2.84.1/girepository/cmph/chd_ph.c:808: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  806|   
#  807|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  808|-> 	mphf->algo = mph->algo;
#  809|   	chd_phf = (chd_ph_data_t *)malloc(sizeof(chd_ph_data_t));
#  810|   	

Error: CPPCHECK_WARNING (CWE-476): [#def234]
glib-2.84.1/girepository/cmph/chd_ph.c:811: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chd_phf
#  809|   	chd_phf = (chd_ph_data_t *)malloc(sizeof(chd_ph_data_t));
#  810|   	
#  811|-> 	chd_phf->cs = chd_ph->cs;
#  812|   	chd_ph->cs = NULL; //transfer memory ownership
#  813|   	chd_phf->hl = chd_ph->hl;

Error: CPPCHECK_WARNING (CWE-476): [#def235]
glib-2.84.1/girepository/cmph/chd_ph.c:813: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chd_phf
#  811|   	chd_phf->cs = chd_ph->cs;
#  812|   	chd_ph->cs = NULL; //transfer memory ownership
#  813|-> 	chd_phf->hl = chd_ph->hl;
#  814|   	chd_ph->hl = NULL; //transfer memory ownership
#  815|   	chd_phf->n = chd_ph->n;

Error: CPPCHECK_WARNING (CWE-476): [#def236]
glib-2.84.1/girepository/cmph/chd_ph.c:815: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chd_phf
#  813|   	chd_phf->hl = chd_ph->hl;
#  814|   	chd_ph->hl = NULL; //transfer memory ownership
#  815|-> 	chd_phf->n = chd_ph->n;
#  816|   	chd_phf->nbuckets = chd_ph->nbuckets;
#  817|   	

Error: CPPCHECK_WARNING (CWE-476): [#def237]
glib-2.84.1/girepository/cmph/chd_ph.c:816: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chd_phf
#  814|   	chd_ph->hl = NULL; //transfer memory ownership
#  815|   	chd_phf->n = chd_ph->n;
#  816|-> 	chd_phf->nbuckets = chd_ph->nbuckets;
#  817|   	
#  818|   	mphf->data = chd_phf;

Error: CPPCHECK_WARNING (CWE-476): [#def238]
glib-2.84.1/girepository/cmph/chd_ph.c:818: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  816|   	chd_phf->nbuckets = chd_ph->nbuckets;
#  817|   	
#  818|-> 	mphf->data = chd_phf;
#  819|   	mphf->size = chd_ph->n;
#  820|   

Error: CPPCHECK_WARNING (CWE-476): [#def239]
glib-2.84.1/girepository/cmph/chd_ph.c:819: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  817|   	
#  818|   	mphf->data = chd_phf;
#  819|-> 	mphf->size = chd_ph->n;
#  820|   
#  821|   	DEBUGP("Successfully generated minimal perfect hash\n");

Error: CPPCHECK_WARNING (CWE-476): [#def240]
glib-2.84.1/girepository/cmph/chd_ph.c:851: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  849|   	DEBUGP("Hash state has %u bytes\n", buflen);
#  850|   	buf = (char *)malloc((size_t)buflen);
#  851|-> 	nbytes = fread(buf, (size_t)buflen, (size_t)1, fd);
#  852|   	chd_ph->hl = hash_state_load(buf, buflen);
#  853|   	free(buf);

Error: CPPCHECK_WARNING (CWE-476): [#def241]
glib-2.84.1/girepository/cmph/chd_ph.c:852: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chd_ph
#  850|   	buf = (char *)malloc((size_t)buflen);
#  851|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, fd);
#  852|-> 	chd_ph->hl = hash_state_load(buf, buflen);
#  853|   	free(buf);
#  854|   	

Error: CPPCHECK_WARNING (CWE-476): [#def242]
glib-2.84.1/girepository/cmph/chd_ph.c:858: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  856|   	DEBUGP("Compressed sequence structure has %u bytes\n", buflen);
#  857|   	buf = (char *)malloc((size_t)buflen);
#  858|-> 	nbytes = fread(buf, (size_t)buflen, (size_t)1, fd);
#  859|   	chd_ph->cs = (compressed_seq_t *) calloc(1, sizeof(compressed_seq_t)); 
#  860|   	compressed_seq_load(chd_ph->cs, buf, buflen);

Error: CPPCHECK_WARNING (CWE-476): [#def243]
glib-2.84.1/girepository/cmph/chd_ph.c:859: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chd_ph
#  857|   	buf = (char *)malloc((size_t)buflen);
#  858|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, fd);
#  859|-> 	chd_ph->cs = (compressed_seq_t *) calloc(1, sizeof(compressed_seq_t)); 
#  860|   	compressed_seq_load(chd_ph->cs, buf, buflen);
#  861|   	free(buf);

Error: CPPCHECK_WARNING (CWE-476): [#def244]
glib-2.84.1/girepository/cmph/chd_ph.c:860: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chd_ph
#  858|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, fd);
#  859|   	chd_ph->cs = (compressed_seq_t *) calloc(1, sizeof(compressed_seq_t)); 
#  860|-> 	compressed_seq_load(chd_ph->cs, buf, buflen);
#  861|   	free(buf);
#  862|   	

Error: CPPCHECK_WARNING (CWE-476): [#def245]
glib-2.84.1/girepository/cmph/chm.c:112: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: visited
#  110|   	DEBUGP("Assignment step\n");
#  111|    	visited = (cmph_uint8 *)malloc((size_t)(chm->n/8 + 1));
#  112|-> 	memset(visited, 0, (size_t)(chm->n/8 + 1));
#  113|   	free(chm->g);
#  114|   	chm->g = (cmph_uint32 *)malloc(chm->n * sizeof(cmph_uint32));

Error: CPPCHECK_WARNING (CWE-476): [#def246]
glib-2.84.1/girepository/cmph/chm.c:129: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  127|   
#  128|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  129|-> 	mphf->algo = mph->algo;
#  130|   	chmf = (chm_data_t *)malloc(sizeof(chm_data_t));
#  131|   	chmf->g = chm->g;

Error: CPPCHECK_WARNING (CWE-476): [#def247]
glib-2.84.1/girepository/cmph/chm.c:131: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chmf
#  129|   	mphf->algo = mph->algo;
#  130|   	chmf = (chm_data_t *)malloc(sizeof(chm_data_t));
#  131|-> 	chmf->g = chm->g;
#  132|   	chm->g = NULL; //transfer memory ownership
#  133|   	chmf->hashes = chm->hashes;

Error: CPPCHECK_WARNING (CWE-476): [#def248]
glib-2.84.1/girepository/cmph/chm.c:133: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chmf
#  131|   	chmf->g = chm->g;
#  132|   	chm->g = NULL; //transfer memory ownership
#  133|-> 	chmf->hashes = chm->hashes;
#  134|   	chm->hashes = NULL; //transfer memory ownership
#  135|   	chmf->n = chm->n;

Error: CPPCHECK_WARNING (CWE-476): [#def249]
glib-2.84.1/girepository/cmph/chm.c:135: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chmf
#  133|   	chmf->hashes = chm->hashes;
#  134|   	chm->hashes = NULL; //transfer memory ownership
#  135|-> 	chmf->n = chm->n;
#  136|   	chmf->m = chm->m;
#  137|   	mphf->data = chmf;

Error: CPPCHECK_WARNING (CWE-476): [#def250]
glib-2.84.1/girepository/cmph/chm.c:136: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chmf
#  134|   	chm->hashes = NULL; //transfer memory ownership
#  135|   	chmf->n = chm->n;
#  136|-> 	chmf->m = chm->m;
#  137|   	mphf->data = chmf;
#  138|   	mphf->size = chm->m;

Error: CPPCHECK_WARNING (CWE-476): [#def251]
glib-2.84.1/girepository/cmph/chm.c:137: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  135|   	chmf->n = chm->n;
#  136|   	chmf->m = chm->m;
#  137|-> 	mphf->data = chmf;
#  138|   	mphf->size = chm->m;
#  139|   	DEBUGP("Successfully generated minimal perfect hash\n");

Error: CPPCHECK_WARNING (CWE-476): [#def252]
glib-2.84.1/girepository/cmph/chm.c:138: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  136|   	chmf->m = chm->m;
#  137|   	mphf->data = chmf;
#  138|-> 	mphf->size = chm->m;
#  139|   	DEBUGP("Successfully generated minimal perfect hash\n");
#  140|   	if (mph->verbosity)

Error: CPPCHECK_WARNING (CWE-476): [#def253]
glib-2.84.1/girepository/cmph/chm.c:252: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chm
#  250|   	mphf->data = chm;
#  251|   	nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f);
#  252|-> 	chm->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1));
#  253|   	chm->hashes[nhashes] = NULL;
#  254|   	DEBUGP("Reading %u hashes\n", nhashes);

Error: CPPCHECK_WARNING (CWE-476): [#def254]
glib-2.84.1/girepository/cmph/chm.c:253: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chm
#  251|   	nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f);
#  252|   	chm->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1));
#  253|-> 	chm->hashes[nhashes] = NULL;
#  254|   	DEBUGP("Reading %u hashes\n", nhashes);
#  255|   	for (i = 0; i < nhashes; ++i)

Error: CPPCHECK_WARNING (CWE-476): [#def255]
glib-2.84.1/girepository/cmph/chm.c:261: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  259|   		DEBUGP("Hash state has %u bytes\n", buflen);
#  260|   		buf = (char *)malloc((size_t)buflen);
#  261|-> 		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  262|   		state = hash_state_load(buf, buflen);
#  263|   		chm->hashes[i] = state;

Error: CPPCHECK_WARNING (CWE-476): [#def256]
glib-2.84.1/girepository/cmph/chm.c:263: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chm
#  261|   		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  262|   		state = hash_state_load(buf, buflen);
#  263|-> 		chm->hashes[i] = state;
#  264|   		free(buf);
#  265|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def257]
glib-2.84.1/girepository/cmph/chm.c:271: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chm
#  269|   	nbytes = fread(&(chm->m), sizeof(cmph_uint32), (size_t)1, f);	
#  270|   
#  271|-> 	chm->g = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*chm->n);
#  272|   	nbytes = fread(chm->g, chm->n*sizeof(cmph_uint32), (size_t)1, f);
#  273|   	if (nbytes == 0 && ferror(f)) {

Error: CPPCHECK_WARNING (CWE-476): [#def258]
glib-2.84.1/girepository/cmph/chm.c:272: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: chm
#  270|   
#  271|   	chm->g = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*chm->n);
#  272|-> 	nbytes = fread(chm->g, chm->n*sizeof(cmph_uint32), (size_t)1, f);
#  273|   	if (nbytes == 0 && ferror(f)) {
#  274|             fprintf(stderr, "ERROR: %s\n", strerror(errno));

Error: CPPCHECK_WARNING (CWE-476): [#def259]
glib-2.84.1/girepository/cmph/cmph_structs.c:12: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mph
#   10|   {
#   11|   	cmph_config_t *mph = (cmph_config_t *)malloc(sizeof(cmph_config_t));
#   12|-> 	memset(mph, 0, sizeof(cmph_config_t));
#   13|   	if (mph == NULL) return NULL;
#   14|   	mph->key_source = key_source;

Error: CPPCHECK_WARNING (CWE-476): [#def260]
glib-2.84.1/girepository/cmph/cmph_structs.c:65: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#   63|   	}
#   64|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#   65|-> 	mphf->algo = algo;
#   66|   	nbytes = fread(&(mphf->size), sizeof(mphf->size), (size_t)1, f);
#   67|   	mphf->data = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def261]
glib-2.84.1/girepository/cmph/cmph_structs.c:67: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#   65|   	mphf->algo = algo;
#   66|   	nbytes = fread(&(mphf->size), sizeof(mphf->size), (size_t)1, f);
#   67|-> 	mphf->data = NULL;
#   68|   	DEBUGP("Algorithm is %s and mphf is sized %u\n", cmph_names[algo],  mphf->size);
#   69|           if (nbytes == 0 && ferror(f)) {

Error: CPPCHECK_WARNING (CWE-476): [#def262]
glib-2.84.1/girepository/cmph/compressed_rank.c:64: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: select_vec
#   62|   			j++;
#   63|   		}
#   64|-> 		select_vec[i - 1] = j;
#   65|   	};
#   66|   

Error: CPPCHECK_WARNING (CWE-476): [#def263]
glib-2.84.1/girepository/cmph/fch.c:155: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vector
#  153|     for (i = 0; i < n; i++) {
#  154|       j = (cmph_uint32) rand() % n;
#  155|->     b = vector[i];
#  156|       vector[i] = vector[j];
#  157|       vector[j] = b;

Error: CPPCHECK_WARNING (CWE-476): [#def264]
glib-2.84.1/girepository/cmph/fch.c:156: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vector
#  154|       j = (cmph_uint32) rand() % n;
#  155|       b = vector[i];
#  156|->     vector[i] = vector[j];
#  157|       vector[j] = b;
#  158|     }

Error: CPPCHECK_WARNING (CWE-476): [#def265]
glib-2.84.1/girepository/cmph/fch.c:157: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vector
#  155|       b = vector[i];
#  156|       vector[i] = vector[j];
#  157|->     vector[j] = b;
#  158|     }
#  159|   }

Error: CPPCHECK_WARNING (CWE-476): [#def266]
glib-2.84.1/girepository/cmph/fch.c:177: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: random_table
#  175|   	for(i = 0; i < fch->m; i++)
#  176|   	{
#  177|-> 		random_table[i] = i;
#  178|   	}
#  179|   	permut(random_table, fch->m);

Error: CPPCHECK_WARNING (CWE-476): [#def267]
glib-2.84.1/girepository/cmph/fch.c:182: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: map_table
#  180|   	for(i = 0; i < fch->m; i++)
#  181|   	{
#  182|-> 		map_table[random_table[i]] = i;
#  183|   	}
#  184|   	do {   

Error: CPPCHECK_WARNING (CWE-476): [#def268]
glib-2.84.1/girepository/cmph/fch.c:182: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: random_table
#  180|   	for(i = 0; i < fch->m; i++)
#  181|   	{
#  182|-> 		map_table[random_table[i]] = i;
#  183|   	}
#  184|   	do {   

Error: CPPCHECK_WARNING (CWE-476): [#def269]
glib-2.84.1/girepository/cmph/fch.c:294: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  292|   	if (iterations == 0) return NULL;
#  293|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  294|-> 	mphf->algo = mph->algo;
#  295|   	fchf = (fch_data_t *)malloc(sizeof(fch_data_t));
#  296|   	fchf->g = fch->g;

Error: CPPCHECK_WARNING (CWE-476): [#def270]
glib-2.84.1/girepository/cmph/fch.c:296: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fchf
#  294|   	mphf->algo = mph->algo;
#  295|   	fchf = (fch_data_t *)malloc(sizeof(fch_data_t));
#  296|-> 	fchf->g = fch->g;
#  297|   	fch->g = NULL; //transfer memory ownership
#  298|   	fchf->h1 = fch->h1;

Error: CPPCHECK_WARNING (CWE-476): [#def271]
glib-2.84.1/girepository/cmph/fch.c:298: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fchf
#  296|   	fchf->g = fch->g;
#  297|   	fch->g = NULL; //transfer memory ownership
#  298|-> 	fchf->h1 = fch->h1;
#  299|   	fch->h1 = NULL; //transfer memory ownership
#  300|   	fchf->h2 = fch->h2;

Error: CPPCHECK_WARNING (CWE-476): [#def272]
glib-2.84.1/girepository/cmph/fch.c:300: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fchf
#  298|   	fchf->h1 = fch->h1;
#  299|   	fch->h1 = NULL; //transfer memory ownership
#  300|-> 	fchf->h2 = fch->h2;
#  301|   	fch->h2 = NULL; //transfer memory ownership
#  302|   	fchf->p2 = fch->p2;

Error: CPPCHECK_WARNING (CWE-476): [#def273]
glib-2.84.1/girepository/cmph/fch.c:302: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fchf
#  300|   	fchf->h2 = fch->h2;
#  301|   	fch->h2 = NULL; //transfer memory ownership
#  302|-> 	fchf->p2 = fch->p2;
#  303|   	fchf->p1 = fch->p1;
#  304|   	fchf->b = fch->b;

Error: CPPCHECK_WARNING (CWE-476): [#def274]
glib-2.84.1/girepository/cmph/fch.c:303: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fchf
#  301|   	fch->h2 = NULL; //transfer memory ownership
#  302|   	fchf->p2 = fch->p2;
#  303|-> 	fchf->p1 = fch->p1;
#  304|   	fchf->b = fch->b;
#  305|   	fchf->c = fch->c;

Error: CPPCHECK_WARNING (CWE-476): [#def275]
glib-2.84.1/girepository/cmph/fch.c:304: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fchf
#  302|   	fchf->p2 = fch->p2;
#  303|   	fchf->p1 = fch->p1;
#  304|-> 	fchf->b = fch->b;
#  305|   	fchf->c = fch->c;
#  306|   	fchf->m = fch->m;

Error: CPPCHECK_WARNING (CWE-476): [#def276]
glib-2.84.1/girepository/cmph/fch.c:305: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fchf
#  303|   	fchf->p1 = fch->p1;
#  304|   	fchf->b = fch->b;
#  305|-> 	fchf->c = fch->c;
#  306|   	fchf->m = fch->m;
#  307|   	mphf->data = fchf;

Error: CPPCHECK_WARNING (CWE-476): [#def277]
glib-2.84.1/girepository/cmph/fch.c:306: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fchf
#  304|   	fchf->b = fch->b;
#  305|   	fchf->c = fch->c;
#  306|-> 	fchf->m = fch->m;
#  307|   	mphf->data = fchf;
#  308|   	mphf->size = fch->m;

Error: CPPCHECK_WARNING (CWE-476): [#def278]
glib-2.84.1/girepository/cmph/fch.c:307: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  305|   	fchf->c = fch->c;
#  306|   	fchf->m = fch->m;
#  307|-> 	mphf->data = fchf;
#  308|   	mphf->size = fch->m;
#  309|   	//DEBUGP("Successfully generated minimal perfect hash\n");

Error: CPPCHECK_WARNING (CWE-476): [#def279]
glib-2.84.1/girepository/cmph/fch.c:308: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: mphf
#  306|   	fchf->m = fch->m;
#  307|   	mphf->data = fchf;
#  308|-> 	mphf->size = fch->m;
#  309|   	//DEBUGP("Successfully generated minimal perfect hash\n");
#  310|   	if (mph->verbosity)

Error: CPPCHECK_WARNING (CWE-476): [#def280]
glib-2.84.1/girepository/cmph/fch.c:373: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fch
#  371|   	mphf->data = fch;
#  372|   	//DEBUGP("Reading h1\n");
#  373|-> 	fch->h1 = NULL;
#  374|   	nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
#  375|   	//DEBUGP("Hash state of h1 has %u bytes\n", buflen);

Error: CPPCHECK_WARNING (CWE-476): [#def281]
glib-2.84.1/girepository/cmph/fch.c:377: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  375|   	//DEBUGP("Hash state of h1 has %u bytes\n", buflen);
#  376|   	buf = (char *)malloc((size_t)buflen);
#  377|-> 	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  378|   	fch->h1 = hash_state_load(buf, buflen);
#  379|   	free(buf);

Error: CPPCHECK_WARNING (CWE-476): [#def282]
glib-2.84.1/girepository/cmph/fch.c:378: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fch
#  376|   	buf = (char *)malloc((size_t)buflen);
#  377|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  378|-> 	fch->h1 = hash_state_load(buf, buflen);
#  379|   	free(buf);
#  380|   	

Error: CPPCHECK_WARNING (CWE-476): [#def283]
glib-2.84.1/girepository/cmph/fch.c:384: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fch
#  382|   	mphf->data = fch;
#  383|   	//DEBUGP("Reading h2\n");
#  384|-> 	fch->h2 = NULL;
#  385|   	nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
#  386|   	//DEBUGP("Hash state of h2 has %u bytes\n", buflen);

Error: CPPCHECK_WARNING (CWE-476): [#def284]
glib-2.84.1/girepository/cmph/fch.c:388: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf
#  386|   	//DEBUGP("Hash state of h2 has %u bytes\n", buflen);
#  387|   	buf = (char *)malloc((size_t)buflen);
#  388|-> 	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  389|   	fch->h2 = hash_state_load(buf, buflen);
#  390|   	free(buf);

Error: CPPCHECK_WARNING (CWE-476): [#def285]
glib-2.84.1/girepository/cmph/fch.c:389: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fch
#  387|   	buf = (char *)malloc((size_t)buflen);
#  388|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  389|-> 	fch->h2 = hash_state_load(buf, buflen);
#  390|   	free(buf);
#  391|   	

Error: CPPCHECK_WARNING (CWE-476): [#def286]
glib-2.84.1/girepository/cmph/fch.c:400: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fch
#  398|   	nbytes = fread(&(fch->p2), sizeof(double), (size_t)1, f);
#  399|   
#  400|-> 	fch->g = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*fch->b);
#  401|   	nbytes = fread(fch->g, fch->b*sizeof(cmph_uint32), (size_t)1, f);
#  402|   	if (nbytes == 0 && ferror(f)) {

Error: CPPCHECK_WARNING (CWE-476): [#def287]
glib-2.84.1/girepository/cmph/fch.c:401: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fch
#  399|   
#  400|   	fch->g = (cmph_uint32 *)malloc(sizeof(cmph_uint32)*fch->b);
#  401|-> 	nbytes = fread(fch->g, fch->b*sizeof(cmph_uint32), (size_t)1, f);
#  402|   	if (nbytes == 0 && ferror(f)) {
#  403|             fprintf(stderr, "ERROR: %s\n", strerror(errno));

Error: CPPCHECK_WARNING (CWE-476): [#def288]
glib-2.84.1/girepository/cmph/fch_buckets.c:181: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: nbuckets_size
#  179|   	
#  180|   	// collect how many buckets for each size.
#  181|-> 	for(i = 0; i < buckets->nbuckets; i++) nbuckets_size[fch_bucket_size(buckets->values + i)] ++;
#  182|   	
#  183|   	// calculating offset considering a decreasing order of buckets size.

Error: CPPCHECK_WARNING (CWE-476): [#def289]
glib-2.84.1/girepository/cmph/fch_buckets.c:184: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: nbuckets_size
#  182|   	
#  183|   	// calculating offset considering a decreasing order of buckets size.
#  184|-> 	value = nbuckets_size[buckets->max_size];
#  185|   	nbuckets_size[buckets->max_size] = sum;
#  186|   	for(i = (int)buckets->max_size - 1; i >= 0; i--)

Error: CPPCHECK_WARNING (CWE-476): [#def290]
glib-2.84.1/girepository/cmph/fch_buckets.c:185: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: nbuckets_size
#  183|   	// calculating offset considering a decreasing order of buckets size.
#  184|   	value = nbuckets_size[buckets->max_size];
#  185|-> 	nbuckets_size[buckets->max_size] = sum;
#  186|   	for(i = (int)buckets->max_size - 1; i >= 0; i--)
#  187|   	{

Error: CPPCHECK_WARNING (CWE-476): [#def291]
glib-2.84.1/girepository/cmph/fch_buckets.c:189: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: nbuckets_size
#  187|   	{
#  188|   		sum += value;
#  189|-> 		value = nbuckets_size[i];
#  190|   		nbuckets_size[i] = sum;
#  191|   		

Error: CPPCHECK_WARNING (CWE-476): [#def292]
glib-2.84.1/girepository/cmph/fch_buckets.c:190: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: nbuckets_size
#  188|   		sum += value;
#  189|   		value = nbuckets_size[i];
#  190|-> 		nbuckets_size[i] = sum;
#  191|   		
#  192|   	}

Error: CPPCHECK_WARNING (CWE-476): [#def293]
glib-2.84.1/girepository/cmph/fch_buckets.c:195: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: nbuckets_size
#  193|   	for(i = 0; i < buckets->nbuckets; i++) 
#  194|   	{
#  195|-> 		sorted_indexes[nbuckets_size[fch_bucket_size(buckets->values + i)]] = (cmph_uint32)i;
#  196|   		nbuckets_size[fch_bucket_size(buckets->values + i)] ++;
#  197|   	}	

Error: CPPCHECK_WARNING (CWE-476): [#def294]
glib-2.84.1/girepository/cmph/fch_buckets.c:195: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: sorted_indexes
#  193|   	for(i = 0; i < buckets->nbuckets; i++) 
#  194|   	{
#  195|-> 		sorted_indexes[nbuckets_size[fch_bucket_size(buckets->values + i)]] = (cmph_uint32)i;
#  196|   		nbuckets_size[fch_bucket_size(buckets->values + i)] ++;
#  197|   	}	

Error: CPPCHECK_WARNING (CWE-476): [#def295]
glib-2.84.1/girepository/cmph/fch_buckets.c:196: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: nbuckets_size
#  194|   	{
#  195|   		sorted_indexes[nbuckets_size[fch_bucket_size(buckets->values + i)]] = (cmph_uint32)i;
#  196|-> 		nbuckets_size[fch_bucket_size(buckets->values + i)] ++;
#  197|   	}	
#  198|   	free(nbuckets_size);

Error: CPPCHECK_WARNING (CWE-476): [#def296]
glib-2.84.1/girepository/cmph/graph.c:212: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: deleted
#  210|   	{
#  211|   		DEBUGP("Deleting edge %u (%u->%u)\n", e, g->edges[abs_edge(e, 0)], g->edges[abs_edge(e, 1)]);
#  212|-> 		SETBIT(deleted, abs_edge(e, 0));
#  213|   		
#  214|   		v2 = g->edges[abs_edge(e, 0)];

Error: CPPCHECK_WARNING (CWE-476): [#def297]
glib-2.84.1/girepository/cmph/graph.c:234: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: deleted
#  232|   	cmph_uint8 *deleted = (cmph_uint8 *)malloc((g->nedges*sizeof(cmph_uint8))/8 + 1);
#  233|   	size_t deleted_len = g->nedges/8 + 1;
#  234|-> 	memset(deleted, 0, deleted_len);
#  235|   
#  236|   	DEBUGP("Looking for cycles in graph with %u vertices and %u edges\n", g->nnodes, g->nedges);

Error: CPPCHECK_WARNING (CWE-476): [#def298]
glib-2.84.1/girepository/cmph/graph.c:265: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: deleted
#  263|   	cmph_uint8 *deleted = (cmph_uint8 *)malloc((g->nedges*sizeof(cmph_uint8))/8+1);
#  264|   	size_t deleted_len = g->nedges/8 + 1;
#  265|-> 	memset(deleted, 0, deleted_len);
#  266|   	free(g->critical_nodes);
#  267|   	g->critical_nodes = (cmph_uint8 *)malloc((g->nnodes*sizeof(cmph_uint8))/8 + 1);

Error: CPPCHECK_WARNING (CWE-476): [#def299]
glib-2.84.1/girepository/cmph/jenkins_hash.c:91: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#   89|   	jenkins_state_t *state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t));
#   90|   	DEBUGP("Initializing jenkins hash\n");
#   91|-> 	state->seed = ((cmph_uint32)rand() % size);
#   92|   	return state;
#   93|   }

Error: CPPCHECK_WARNING (CWE-476): [#def300]
glib-2.84.1/girepository/cmph/jenkins_hash.c:237: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dest_state
#  235|   {
#  236|   	jenkins_state_t *dest_state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t));
#  237|-> 	dest_state->hashfunc = src_state->hashfunc;
#  238|   	dest_state->seed = src_state->seed;
#  239|   	return dest_state;

Error: CPPCHECK_WARNING (CWE-476): [#def301]
glib-2.84.1/girepository/cmph/jenkins_hash.c:238: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dest_state
#  236|   	jenkins_state_t *dest_state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t));
#  237|   	dest_state->hashfunc = src_state->hashfunc;
#  238|-> 	dest_state->seed = src_state->seed;
#  239|   	return dest_state;
#  240|   }

Error: CPPCHECK_WARNING (CWE-476): [#def302]
glib-2.84.1/girepository/cmph/jenkins_hash.c:245: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  243|   {
#  244|   	jenkins_state_t *state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t));
#  245|-> 	state->seed = *(cmph_uint32 *)buf;
#  246|   	state->hashfunc = CMPH_HASH_JENKINS;
#  247|   	DEBUGP("Loaded jenkins state with seed %u\n", state->seed);

Error: CPPCHECK_WARNING (CWE-476): [#def303]
glib-2.84.1/girepository/cmph/jenkins_hash.c:246: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: state
#  244|   	jenkins_state_t *state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t));
#  245|   	state->seed = *(cmph_uint32 *)buf;
#  246|-> 	state->hashfunc = CMPH_HASH_JENKINS;
#  247|   	DEBUGP("Loaded jenkins state with seed %u\n", state->seed);
#  248|   	return state;

Error: CPPCHECK_WARNING (CWE-457): [#def304]
glib-2.84.1/girepository/gibaseinfo.c:915: error[uninitvar]: Uninitialized variables: &blob.name, &blob.value
#  913|     first = (AttributeBlob *) &rinfo->typelib->data[header->attributes];
#  914|   
#  915|->   res = bsearch (&blob, first, header->n_attributes,
#  916|                    header->attribute_blob_size, cmp_attribute);
#  917|   

Error: COMPILER_WARNING (CWE-476): [#def305]
glib-2.84.1/girepository/girparser.c:682:11: warning[-Wnull-dereference]: potential null pointer dereference
#  682 |       if (*str == '<')
#      |           ^~~~
#  680|         g_assert (str != NULL);
#  681|   
#  682|->       if (*str == '<')
#  683|           {
#  684|             char *tmp, *end;

Error: CPPCHECK_WARNING (CWE-457): [#def306]
glib-2.84.1/girepository/girparser.c:1714: error[legacyUninitvar]: Uninitialized variable: target_state
# 1712|       g_assert_not_reached ();
# 1713|   
# 1714|->   if (!introspectable_prelude (context, attribute_names, attribute_values, ctx, target_state))
# 1715|       return TRUE;
# 1716|   

Error: CPPCHECK_WARNING (CWE-562): [#def307]
glib-2.84.1/glib/gdataset.c:1162: error[returnDanglingLifetime]: Returning pointer to local variable 'new_data' that will be invalid when returning.
# 1160|       g_datalist_unlock (datalist);
# 1161|   
# 1162|->   return result;
# 1163|   }
# 1164|   

Error: CPPCHECK_WARNING (CWE-562): [#def308]
glib-2.84.1/glib/gdataset.c:1162: error[returnDanglingLifetime]: Returning pointer to local variable 'new_destroy' that will be invalid when returning.
# 1160|       g_datalist_unlock (datalist);
# 1161|   
# 1162|->   return result;
# 1163|   }
# 1164|   

Error: COMPILER_WARNING: [#def309]
glib-2.84.1/redhat-linux-build/g-ir-cpp-hd2y0bwj.c:43: included_from: Included from here.
glib-2.84.1/glib/gi18n-lib.h:32:10: warning: ‘_’ redefined
#   32 | #define  _(String) ((char *) g_dgettext (GETTEXT_PACKAGE, String))
#      |          ^
glib-2.84.1/redhat-linux-build/g-ir-cpp-hd2y0bwj.c:42: included_from: Included from here.
glib-2.84.1/glib/gi18n.h:28:10: note: this is the location of the previous definition
#   28 | #define  _(String) gettext (String)
#      |          ^
#   30|   #endif
#   31|   
#   32|-> #define  _(String) ((char *) g_dgettext (GETTEXT_PACKAGE, String))
#   33|   #define Q_(String) g_dpgettext (GETTEXT_PACKAGE, String, 0)
#   34|   #define N_(String) (String)

Error: COMPILER_WARNING: [#def310]
glib-2.84.1/glib/gi18n-lib.h:33:9: warning: ‘Q_’ redefined
#   33 | #define Q_(String) g_dpgettext (GETTEXT_PACKAGE, String, 0)
#      |         ^~
glib-2.84.1/glib/gi18n.h:29:9: note: this is the location of the previous definition
#   29 | #define Q_(String) g_dpgettext (NULL, String, 0)
#      |         ^~
#   31|   
#   32|   #define  _(String) ((char *) g_dgettext (GETTEXT_PACKAGE, String))
#   33|-> #define Q_(String) g_dpgettext (GETTEXT_PACKAGE, String, 0)
#   34|   #define N_(String) (String)
#   35|   #define C_(Context,String) g_dpgettext (GETTEXT_PACKAGE, Context "\004" String, strlen (Context) + 1)

Error: COMPILER_WARNING: [#def311]
glib-2.84.1/glib/gi18n-lib.h:35:9: warning: ‘C_’ redefined
#   35 | #define C_(Context,String) g_dpgettext (GETTEXT_PACKAGE, Context "\004" String, strlen (Context) + 1)
#      |         ^~
glib-2.84.1/glib/gi18n.h:31:9: note: this is the location of the previous definition
#   31 | #define C_(Context,String) g_dpgettext (NULL, Context "\004" String, strlen (Context) + 1)
#      |         ^~
#   33|   #define Q_(String) g_dpgettext (GETTEXT_PACKAGE, String, 0)
#   34|   #define N_(String) (String)
#   35|-> #define C_(Context,String) g_dpgettext (GETTEXT_PACKAGE, Context "\004" String, strlen (Context) + 1)
#   36|   #define NC_(Context, String) (String)
#   37|   

Error: COMPILER_WARNING (CWE-476): [#def312]
glib-2.84.1/glib/gkeyfile.c: scope_hint: In function ‘g_key_file_set_group_comment’
glib-2.84.1/glib/gkeyfile.c:3460:21: warning[-Wnull-dereference]: potential null pointer dereference
# 3460 |   group = group_node->next->data;
#      |           ~~~~~~~~~~^~~~~~
# 3458|      */
# 3459|     group_node = g_key_file_lookup_group_node (key_file, group_name);
# 3460|->   group = group_node->next->data;
# 3461|     for (GList *lp = group->key_value_pairs; lp != NULL; )
# 3462|       {

Error: COMPILER_WARNING (CWE-476): [#def313]
glib-2.84.1/glib/gkeyfile.c:3689:14: warning[-Wnull-dereference]: potential null pointer dereference
# 3689 |   group_node = group_node->next;
#      |   ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
# 3687|   
# 3688|     group_node = g_key_file_lookup_group_node (key_file, group_name);
# 3689|->   group_node = group_node->next;
# 3690|     group = (GKeyFileGroup *)group_node->data;  
# 3691|     return get_group_comment (key_file, group, error);

Error: CPPCHECK_WARNING (CWE-909): [#def314]
glib-2.84.1/glib/gkeyfile.c:3918: error[uninitStructMember]: Uninitialized struct member: pair.key
# 3916|   
# 3917|         if (next_group->key_value_pairs == NULL ||
# 3918|->           (pair->key != NULL && !g_strstr_len (pair->value, -1, "\n")))
# 3919|           {
# 3920|             GKeyFileKeyValuePair *pair = g_new (GKeyFileKeyValuePair, 1);

Error: CPPCHECK_WARNING (CWE-457): [#def315]
glib-2.84.1/glib/gkeyfile.c:3918: warning[uninitvar]: Uninitialized variable: pair
# 3916|   
# 3917|         if (next_group->key_value_pairs == NULL ||
# 3918|->           (pair->key != NULL && !g_strstr_len (pair->value, -1, "\n")))
# 3919|           {
# 3920|             GKeyFileKeyValuePair *pair = g_new (GKeyFileKeyValuePair, 1);

Error: CPPCHECK_WARNING (CWE-476): [#def316]
glib-2.84.1/glib/gslist.c:283: warning[nullPointer]: Possible null pointer dereference: prev_list
#  281|       }
#  282|   
#  283|->   new_list->next = prev_list->next;
#  284|     prev_list->next = new_list;
#  285|   

Error: CPPCHECK_WARNING (CWE-476): [#def317]
glib-2.84.1/glib/gslist.c:284: warning[nullPointer]: Possible null pointer dereference: prev_list
#  282|   
#  283|     new_list->next = prev_list->next;
#  284|->   prev_list->next = new_list;
#  285|   
#  286|     return list;

Error: CPPCHECK_WARNING (CWE-476): [#def318]
glib-2.84.1/glib/gtestutils.c:3446: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: __glib_assert_msg
# 3444|       free (__glib_assert_msg);
# 3445|     __glib_assert_msg = (char*) malloc (strlen (s) + 1);
# 3446|->   strcpy (__glib_assert_msg, s);
# 3447|   
# 3448|     g_free (s);

Error: CPPCHECK_WARNING (CWE-457): [#def319]
glib-2.84.1/glib/gutils.c:3310: error[uninitvar]: Uninitialized variable: euid
# 3308|         /* These aren't in the header files, so we prototype them here.
# 3309|          */
# 3310|->       int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
# 3311|         int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
# 3312|         

Error: CPPCHECK_WARNING (CWE-457): [#def320]
glib-2.84.1/glib/gutils.c:3310: error[uninitvar]: Uninitialized variable: ruid
# 3308|         /* These aren't in the header files, so we prototype them here.
# 3309|          */
# 3310|->       int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
# 3311|         int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
# 3312|         

Error: CPPCHECK_WARNING (CWE-457): [#def321]
glib-2.84.1/glib/gutils.c:3310: error[uninitvar]: Uninitialized variable: suid
# 3308|         /* These aren't in the header files, so we prototype them here.
# 3309|          */
# 3310|->       int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
# 3311|         int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
# 3312|         

Error: CPPCHECK_WARNING (CWE-457): [#def322]
glib-2.84.1/glib/gutils.c:3311: error[uninitvar]: Uninitialized variable: egid
# 3309|          */
# 3310|         int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
# 3311|->       int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
# 3312|         
# 3313|         if (getresuid (&ruid, &euid, &suid) != 0 ||

Error: CPPCHECK_WARNING (CWE-457): [#def323]
glib-2.84.1/glib/gutils.c:3311: error[uninitvar]: Uninitialized variable: rgid
# 3309|          */
# 3310|         int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
# 3311|->       int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
# 3312|         
# 3313|         if (getresuid (&ruid, &euid, &suid) != 0 ||

Error: CPPCHECK_WARNING (CWE-457): [#def324]
glib-2.84.1/glib/gutils.c:3311: error[uninitvar]: Uninitialized variable: sgid
# 3309|          */
# 3310|         int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
# 3311|->       int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
# 3312|         
# 3313|         if (getresuid (&ruid, &euid, &suid) != 0 ||

Error: COMPILER_WARNING (CWE-476): [#def325]
glib-2.84.1/glib/gvariant-parser.c:1709:9: warning[-Wnull-dereference]: potential null pointer dereference
# 1709 |   quote = token[0];
#      |   ~~~~~~^~~~~~~~~~
# 1707|     token_stream_end_ref (stream, &ref);
# 1708|     length = strlen (token);
# 1709|->   quote = token[0];
# 1710|   
# 1711|     /* The output will always be at least one byte smaller than the input,

Error: COMPILER_WARNING (CWE-476): [#def326]
glib-2.84.1/glib/gvariant-parser.c:1841:18: warning[-Wnull-dereference]: potential null pointer dereference
# 1841 |   g_assert (token[0] == 'b');
#      |             ~~~~~^~~
# 1839|     token = token_stream_get (stream);
# 1840|     token_stream_end_ref (stream, &ref);
# 1841|->   g_assert (token[0] == 'b');
# 1842|     length = strlen (token);
# 1843|     quote = token[1];

Error: COMPILER_WARNING (CWE-476): [#def327]
glib-2.84.1/glib/gvariant-parser.c:2231:18: warning[-Wnull-dereference]: potential null pointer dereference
# 2231 |   g_assert (token[0] == '%');
#      |             ~~~~~^~~
# 2229|   
# 2230|     token = token_stream_get (stream);
# 2231|->   g_assert (token[0] == '%');
# 2232|   
# 2233|     positional = g_slice_new (Positional);

Error: CPPCHECK_WARNING (CWE-457): [#def328]
glib-2.84.1/glib/gvariant.c:3826: error[legacyUninitvar]: Uninitialized variable: type
# 3824|       children = g_renew (GVariant *, children, GVSB(builder)->offset);
# 3825|   
# 3826|->   value = g_variant_new_from_children (type,
# 3827|                                          children,
# 3828|                                          GVSB(builder)->offset,

Error: CPPCHECK_WARNING (CWE-457): [#def329]
glib-2.84.1/glib/tests/array-test.c:906: error[uninitvar]: Uninitialized variable: &i
#  904|         g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
#  905|                                "*assertion*!= NULL*");
#  906|->       g_assert_false (g_array_binary_search (NULL, &i, cmpint, NULL));
#  907|         g_test_assert_expected_messages ();
#  908|   

Error: COMPILER_WARNING (CWE-476): [#def330]
glib-2.84.1/glib/tests/error.c:263:13: warning[-Wnull-dereference]: potential null pointer dereference
#  263 |   priv->foo = 13;
#      |   ~~~~~~~~~~^~~~
#  261|     g_assert_nonnull (priv);
#  262|   
#  263|->   priv->foo = 13;
#  264|     /* If that triggers, it's test bug.
#  265|      */

Error: COMPILER_WARNING (CWE-476): [#def331]
glib-2.84.1/glib/tests/error.c:280:18: warning[-Wnull-dereference]: potential null pointer dereference
#  280 |   dest_priv->foo = src_priv->foo;
#      |   ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
#  278|     g_assert_nonnull (dest_priv);
#  279|   
#  280|->   dest_priv->foo = src_priv->foo;
#  281|     dest_priv->check = src_priv->check;
#  282|   

Error: COMPILER_WARNING (CWE-476): [#def332]
glib-2.84.1/glib/tests/error.c:280:28: warning[-Wnull-dereference]: potential null pointer dereference
#  280 |   dest_priv->foo = src_priv->foo;
#      |                    ~~~~~~~~^~~~~
#  278|     g_assert_nonnull (dest_priv);
#  279|   
#  280|->   dest_priv->foo = src_priv->foo;
#  281|     dest_priv->check = src_priv->check;
#  282|   

Error: COMPILER_WARNING (CWE-476): [#def333]
glib-2.84.1/glib/tests/error.c:281:20: warning[-Wnull-dereference]: potential null pointer dereference
#  281 |   dest_priv->check = src_priv->check;
#      |   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
#  279|   
#  280|     dest_priv->foo = src_priv->foo;
#  281|->   dest_priv->check = src_priv->check;
#  282|   
#  283|     g_assert_nonnull (dest_priv->check);

Error: COMPILER_WARNING (CWE-476): [#def334]
glib-2.84.1/glib/tests/error.c:281:30: warning[-Wnull-dereference]: potential null pointer dereference
#  281 |   dest_priv->check = src_priv->check;
#      |                      ~~~~~~~~^~~~~~~
#  279|   
#  280|     dest_priv->foo = src_priv->foo;
#  281|->   dest_priv->check = src_priv->check;
#  282|   
#  283|     g_assert_nonnull (dest_priv->check);

Error: COMPILER_WARNING (CWE-476): [#def335]
glib-2.84.1/glib/tests/error.c:290:25: warning[-Wnull-dereference]: potential null pointer dereference
#  290 |   g_assert_nonnull (priv->check);
#  288|   test_error_private_clear (TestErrorPrivate *priv)
#  289|   {
#  290|->   g_assert_nonnull (priv->check);
#  291|     priv->check->free_called++;
#  292|   }

Error: COMPILER_WARNING (CWE-476): [#def336]
glib-2.84.1/glib/tests/error.c:302:21: warning[-Wnull-dereference]: potential null pointer dereference
#  302 |   test_error->check = check;
#      |   ~~~~~~~~~~~~~~~~~~^~~~~~~
#  300|   
#  301|     g_assert_nonnull (test_error);
#  302|->   test_error->check = check;
#  303|   
#  304|     return test_error;

Error: COMPILER_WARNING (CWE-476): [#def337]
glib-2.84.1/glib/glib.h:89: included_from: Included from here.
glib-2.84.1/glib/tests/error.c: scope_hint: In function ‘test_extended’
glib-2.84.1/glib/tests/error.c:338:54: warning[-Wnull-dereference]: potential null pointer dereference
#  338 |   g_assert_cmpint (test_priv->foo, ==, copy_test_priv->foo);
#  336|     copy_test_priv = test_error_get_private (copy_error);
#  337|     g_assert_nonnull (copy_test_priv);
#  338|->   g_assert_cmpint (test_priv->foo, ==, copy_test_priv->foo);
#  339|   
#  340|     g_error_free (error);

Error: CPPCHECK_WARNING (CWE-476): [#def338]
glib-2.84.1/glib/tests/fileutils.c:2041: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: file
# 2039|     file = fopen (filename, "w");
# 2040|     g_assert_nonnull (file);
# 2041|->   fclose (file);
# 2042|   
# 2043|     g_assert_no_errno (symlink (filename, link1));

Error: CPPCHECK_WARNING (CWE-457): [#def339]
glib-2.84.1/glib/tests/gvariant.c:481: error[legacyUninitvar]: Uninitialized variable: result
#  479|       }
#  480|   
#  481|->   return result;
#  482|   }
#  483|   

Error: CPPCHECK_WARNING (CWE-457): [#def340]
glib-2.84.1/glib/tests/gvariant.c:538: error[legacyUninitvar]: Uninitialized variable: replacement
#  536|     g_string_append (result, type_string + l + 1);
#  537|   
#  538|->   g_variant_type_free (replacement);
#  539|     g_string_free (junk, TRUE);
#  540|   

Error: CPPCHECK_WARNING (CWE-457): [#def341]
glib-2.84.1/glib/tests/markup-parse.c:249: error[legacyUninitvar]: Uninitialized variable: expected
#  247|     g_free (f);
#  248|   
#  249|->   return expected;
#  250|   }
#  251|   

Error: CPPCHECK_WARNING (CWE-476): [#def342]
glib-2.84.1/glib/tests/string.c:744: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: test_str
#  742|     GString *string;
#  743|   
#  744|->   strcpy (test_str, test_str_const);
#  745|     g_assert_cmpstr (test_str, ==, test_str_const);
#  746|   

Error: CPPCHECK_WARNING (CWE-476): [#def343]
glib-2.84.1/glib/tests/unicode.c:642: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: infile
#  640|     g_assert (infile != NULL);
#  641|   
#  642|->   while (fgets (buffer, sizeof (buffer), infile))
#  643|       {
#  644|         if (buffer[0] == '#')

Error: CPPCHECK_WARNING (CWE-476): [#def344]
glib-2.84.1/glib/tests/unicode.c:706: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: infile
#  704|     g_assert (infile != NULL);
#  705|   
#  706|->   while (fgets (buffer, sizeof (buffer), infile))
#  707|       {
#  708|         if (buffer[0] == '#')

Error: CPPCHECK_WARNING (CWE-476): [#def345]
glib-2.84.1/gobject/gobject.c:1797: warning[nullPointer]: Possible null pointer dereference: g_enable_diagnostic
# 1795|       }
# 1796|   
# 1797|->   return g_enable_diagnostic[0] == '1';
# 1798|   }
# 1799|   

Error: COMPILER_WARNING (CWE-476): [#def346]
glib-2.84.1/gobject/gsignal.c: scope_hint: In function ‘handlers_find’
glib-2.84.1/gobject/gsignal.c:558:28: warning[-Wnull-dereference]: potential null pointer dereference
#  558 |                   if (!node->c_marshaller)
#      |                        ~~~~^~~~~~~~~~~~~~
#  556|   		{
#  557|   		  node = LOOKUP_SIGNAL_NODE (hlist->signal_id);
#  558|-> 		  if (!node->c_marshaller)
#  559|   		    continue;
#  560|   		}

Error: COMPILER_WARNING (CWE-476): [#def347]
glib-2.84.1/gobject/gsignal.c: scope_hint: In function ‘handler_insert’
glib-2.84.1/gobject/gsignal.c:685:13: warning[-Wnull-dereference]: potential null pointer dereference
#  685 |   if (!hlist->handlers)
#      |        ~~~~~^~~~~~~~~~
#  683|   
#  684|     hlist = handler_list_ensure (signal_id, instance);
#  685|->   if (!hlist->handlers)
#  686|       {
#  687|         hlist->handlers = handler;

Error: COMPILER_WARNING (CWE-476): [#def348]
glib-2.84.1/gobject/gclosure.h:27: included_from: Included from here.
glib-2.84.1/gobject/gsignal.h:26: included_from: Included from here.
glib-2.84.1/gobject/gsignal.c:32: included_from: Included from here.
glib-2.84.1/gobject/gsignal.c: scope_hint: In function ‘g_signal_stop_emission_by_name’
glib-2.84.1/gobject/gsignal.c:1167:41: warning[-Wnull-dereference]: potential null pointer dereference
# 1167 |       else if (!g_type_is_a (itype, node->itype))
# 1165|         if (detail && !(node->flags & G_SIGNAL_DETAILED))
# 1166|   	g_critical ("%s: signal '%s' does not support details", G_STRLOC, detailed_signal);
# 1167|->       else if (!g_type_is_a (itype, node->itype))
# 1168|           g_critical ("%s: signal '%s' is invalid for instance '%p' of type '%s'",
# 1169|                       G_STRLOC, detailed_signal, instance, g_type_name (itype));

Error: COMPILER_WARNING (CWE-476): [#def349]
glib-2.84.1/gobject/gsignal.c:1816:17: warning[-Wnull-dereference]: potential null pointer dereference
# 1816 |           if (cc->closure->marshal == node->c_marshaller)
#      |               ~~^~~~~~~~~
# 1814|   	{
# 1815|   	  ClassClosure *cc = g_bsearch_array_get_nth (node->class_closure_bsa, &g_class_closure_bconfig, 0);
# 1816|-> 	  if (cc->closure->marshal == node->c_marshaller)
# 1817|   	    _g_closure_set_va_marshal (cc->closure, va_marshaller);
# 1818|   	}

Error: COMPILER_WARNING (CWE-476): [#def350]
glib-2.84.1/gobject/gsignal.c:1979:40: warning[-Wnull-dereference]: potential null pointer dereference
# 1979 |   if (!g_type_is_a (instance_type, node->itype))
# 1977|     node = LOOKUP_SIGNAL_NODE (signal_id);
# 1978|     node_check_deprecated (node);
# 1979|->   if (!g_type_is_a (instance_type, node->itype))
# 1980|       g_critical ("%s: type '%s' cannot be overridden for signal id '%u'", G_STRLOC, type_debug_name (instance_type), signal_id);
# 1981|     else

Error: COMPILER_WARNING (CWE-476): [#def351]
glib-2.84.1/gobject/gsignal.c: scope_hint: In function ‘g_signal_connect_closure’
glib-2.84.1/gobject/gsignal.c:2410:41: warning[-Wnull-dereference]: potential null pointer dereference
# 2410 |       else if (!g_type_is_a (itype, node->itype))
# 2408|         if (detail && !(node->flags & G_SIGNAL_DETAILED))
# 2409|   	g_critical ("%s: signal '%s' does not support details", G_STRLOC, detailed_signal);
# 2410|->       else if (!g_type_is_a (itype, node->itype))
# 2411|           g_critical ("%s: signal '%s' is invalid for instance '%p' of type '%s'",
# 2412|                       G_STRLOC, detailed_signal, instance, g_type_name (itype));

Error: COMPILER_WARNING (CWE-476): [#def352]
glib-2.84.1/gobject/gsignal.c: scope_hint: In function ‘g_signal_connect_data’
glib-2.84.1/gobject/gsignal.c:2522:41: warning[-Wnull-dereference]: potential null pointer dereference
# 2522 |       else if (!g_type_is_a (itype, node->itype))
# 2520|         if (detail && !(node->flags & G_SIGNAL_DETAILED))
# 2521|   	g_critical ("%s: signal '%s' does not support details", G_STRLOC, detailed_signal);
# 2522|->       else if (!g_type_is_a (itype, node->itype))
# 2523|           g_critical ("%s: signal '%s' is invalid for instance '%p' of type '%s'",
# 2524|                       G_STRLOC, detailed_signal, instance, g_type_name (itype));

Error: COMPILER_WARNING (CWE-476): [#def353]
glib-2.84.1/gobject/gtype.c: scope_hint: In function ‘type_node_fundamental_new_W’
glib-2.84.1/gobject/gtype.c:529:21: warning[-Wnull-dereference]: potential null pointer dereference
#  529 |   finfo->type_flags = type_flags & TYPE_FUNDAMENTAL_FLAG_MASK;
#      |                     ^
#  527|   
#  528|     finfo = type_node_fundamental_info_I (node);
#  529|->   finfo->type_flags = type_flags & TYPE_FUNDAMENTAL_FLAG_MASK;
#  530|   
#  531|     return node;

Error: COMPILER_WARNING (CWE-476): [#def354]
glib-2.84.1/gobject/gtype.c: scope_hint: In function ‘check_derivation_I’
glib-2.84.1/gobject/gtype.c:770:14: warning[-Wnull-dereference]: potential null pointer dereference
#  770 |   if (!(finfo->type_flags & G_TYPE_FLAG_DERIVABLE))
#      |         ~~~~~^~~~~~~~~~~~
#  768|     finfo = type_node_fundamental_info_I (pnode);
#  769|     /* ensure flat derivability */
#  770|->   if (!(finfo->type_flags & G_TYPE_FLAG_DERIVABLE))
#  771|       {
#  772|         g_critical ("cannot derive '%s' from non-derivable parent type '%s'",

Error: COMPILER_WARNING (CWE-476): [#def355]
glib-2.84.1/gobject/gtype.c:3756:26: warning[-Wnull-dereference]: potential null pointer dereference
# 3756 |           fflags = (finfo->type_flags & fflags) == fflags;
#      |                     ~~~~~^~~~~~~~~~~~
# 3754|   	  GTypeFundamentalInfo *finfo = type_node_fundamental_info_I (node);
# 3755|   	  
# 3756|-> 	  fflags = (finfo->type_flags & fflags) == fflags;
# 3757|   	}
# 3758|         else

Error: COMPILER_WARNING (CWE-476): [#def356]
glib-2.84.1/glib/glib.h:64: included_from: Included from here.
glib-2.84.1/girepository/girwriter-private.h:26: included_from: Included from here.
glib-2.84.1/girepository/girwriter.c:27: included_from: Included from here.
glib-2.84.1/girepository/girwriter.c: scope_hint: In function ‘gi_ir_writer_write’
glib-2.84.1/gobject/gtype.h:646:114: warning[-Wnull-dereference]: potential null pointer dereference
#  646 | #define G_TYPE_FROM_INSTANCE(instance)                          (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))->g_class))
#      |                                                                                                                  ^
#  644|    * Returns: the #GType
#  645|    */
#  646|-> #define G_TYPE_FROM_INSTANCE(instance)                          (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))->g_class))
#  647|   /**
#  648|    * G_TYPE_FROM_CLASS:

Error: COMPILER_WARNING (CWE-476): [#def357]
glib-2.84.1/gobject/gtypemodule.c:335:9: warning[-Wnull-dereference]: potential null pointer dereference
#  335 |   *info = module_type_info->info;
#      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
#  333|     ModuleTypeInfo *module_type_info = g_type_module_find_type_info (module, g_type);
#  334|   
#  335|->   *info = module_type_info->info;
#  336|     
#  337|     if (module_type_info->info.value_table)

Error: COMPILER_WARNING (CWE-476): [#def358]
glib-2.84.1/gobject/gtypemodule.c: scope_hint: In function ‘g_type_module_complete_type_info’
glib-2.84.1/gobject/gtypemodule.c:337:29: warning[-Wnull-dereference]: potential null pointer dereference
#  337 |   if (module_type_info->info.value_table)
#      |       ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
#  335|     *info = module_type_info->info;
#  336|     
#  337|->   if (module_type_info->info.value_table)
#  338|       *value_table = *module_type_info->info.value_table;
#  339|   }

Error: COMPILER_WARNING (CWE-476): [#def359]
glib-2.84.1/gobject/gtypemodule.c: scope_hint: In function ‘g_type_module_complete_interface_info’
glib-2.84.1/gobject/gtypemodule.c:350:9: warning[-Wnull-dereference]: potential null pointer dereference
#  350 |   *info = module_interface_info->info;
#      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  348|     ModuleInterfaceInfo *module_interface_info = g_type_module_find_interface_info (module, instance_type, interface_type);
#  349|   
#  350|->   *info = module_interface_info->info;
#  351|   }
#  352|   

Error: COMPILER_WARNING (CWE-476): [#def360]
glib-2.84.1/gobject/gtypemodule.c: scope_hint: In function ‘g_type_module_register_type’
glib-2.84.1/gobject/gtypemodule.c:420:27: warning[-Wnull-dereference]: potential null pointer dereference
#  420 |       if (module_type_info->parent_type != parent_type)
#      |           ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
#  418|         module_type_info = g_type_module_find_type_info (module, type);
#  419|   
#  420|->       if (module_type_info->parent_type != parent_type)
#  421|   	{
#  422|   	  const gchar *parent_type_name = g_type_name (parent_type);

Error: CPPCHECK_WARNING (CWE-758): [#def361]
glib-2.84.1/gobject/tests/flags.c:40: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   38|     NO_FLAG      = 0,
#   39|     LOWEST_FLAG  = 1,
#   40|->   HIGHEST_FLAG = 1 << 31
#   41|   } MyFlagsEnum;
#   42|   

Error: CPPCHECK_WARNING (CWE-758): [#def362]
glib-2.84.1/gobject/tests/signals.c:121: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  119|     MY_FLAGS_FIRST_BIT = (1 << 0),
#  120|     MY_FLAGS_THIRD_BIT = (1 << 2),
#  121|->   MY_FLAGS_LAST_BIT = (1 << 31)
#  122|   } MyFlags;
#  123|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def363]
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:1126:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:1114:1: enter_function: entry to ‘g_application_real_local_command_line’
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:1118:11: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:1123:13: call_function: calling ‘g_application_parse_command_line’ from ‘g_application_real_local_command_line’
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:1123:13: return_function: returning to ‘g_application_real_local_command_line’ from ‘g_application_parse_command_line’
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:1124:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:1126:32: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:1126:32: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:1127:7: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:1126:7: danger: dereference of NULL ‘error’
# 1124|     if (!options)
# 1125|       {
# 1126|->       g_printerr ("%s\n", error->message);
# 1127|         g_error_free (error);
# 1128|         *exit_status = 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def364]
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2691:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2591:1: enter_function: entry to ‘g_application_run’
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2600:3: branch_false: following ‘false’ branch (when ‘application’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2600:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2601:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2602:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2602:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2659:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2677:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2684:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2684:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2687:15: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2687:15: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2689:12: call_function: calling ‘g_application_register’ from ‘g_application_run’
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2689:12: return_function: returning to ‘g_application_run’ from ‘g_application_register’
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2689:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2691:56: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2691:56: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2692:11: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gapplication.c:2691:11: danger: dereference of NULL ‘error’
# 2689|         if (!g_application_register (application, NULL, &error))
# 2690|           {
# 2691|->           g_printerr ("Failed to register: %s\n", error->message);
# 2692|             g_error_free (error);
# 2693|             return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def365]
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1111:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1084:1: enter_function: entry to ‘mechanism_server_data_send’
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1093:3: branch_false: following ‘false’ branch (when ‘mechanism’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1093:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1093:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1094:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1094:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1095:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1098:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1104:3: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1104:3: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1105:8: call_function: calling ‘keyring_generate_entry’ from ‘mechanism_server_data_send’
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1105:8: return_function: returning to ‘mechanism_server_data_send’ from ‘keyring_generate_entry’
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1105:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1110:15: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1111:91: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1111:32: danger: dereference of NULL ‘error’
# 1109|       {
# 1110|         g_free (m->priv->reject_reason);
# 1111|->       m->priv->reject_reason = g_strdup_printf ("Error adding entry to keyring: %s", error->message);
# 1112|         g_error_free (error);
# 1113|         m->priv->state = G_DBUS_AUTH_MECHANISM_STATE_REJECTED;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def366]
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1250:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1202:1: enter_function: entry to ‘mechanism_client_data_receive’
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1217:3: branch_false: following ‘false’ branch (when ‘mechanism’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1217:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1218:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1219:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1225:12: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1226:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1234:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1236:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1243:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1245:3: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1246:12: call_function: calling ‘keyring_lookup_entry’ from ‘mechanism_client_data_receive’
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1246:12: return_function: returning to ‘mechanism_client_data_receive’ from ‘keyring_lookup_entry’
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1247:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1249:15: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1250:98: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1250:98: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1250:98: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1250:98: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gdbusauthmechanismsha1.c:1250:32: danger: dereference of NULL ‘error’
# 1248|       {
# 1249|         g_free (m->priv->reject_reason);
# 1250|->       m->priv->reject_reason = g_strdup_printf ("Problems looking up entry in keyring: %s", error->message);
# 1251|         g_error_free (error);
# 1252|         m->priv->state = G_DBUS_AUTH_MECHANISM_STATE_REJECTED;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def367]
glib-2.84.1/redhat-linux-build/../gio/gdbusconnection.c:6476:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’
glib-2.84.1/redhat-linux-build/../gio/gdbusconnection.c:6452:11: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gdbusconnection.c:6460:7: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdbusconnection.c:6462:7: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusconnection.c:6468:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdbusconnection.c:6478:25: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusconnection.c:6478:25: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gdbusconnection.c:6476:11: danger: dereference of NULL ‘error’
# 6474|         else
# 6475|           {
# 6476|->           g_print ("\n"
# 6477|                      "      FAILED: %s\n",
# 6478|                      error->message);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def368]
glib-2.84.1/redhat-linux-build/../gio/gdbusconnection.c:6738:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘local_error’
glib-2.84.1/redhat-linux-build/../gio/gdbusconnection.c:6933:1: enter_function: entry to ‘g_dbus_connection_call_sync’
glib-2.84.1/redhat-linux-build/../gio/gdbusconnection.c:6945:10: call_function: calling ‘g_dbus_connection_call_sync_internal’ from ‘g_dbus_connection_call_sync’
# 6736|         else
# 6737|           {
# 6738|->           g_print ("FAILED: %s\n",
# 6739|                      local_error->message);
# 6740|           }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def369]
glib-2.84.1/redhat-linux-build/../gio/gdbusinterfaceskeleton.c:660:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  658|   {
#  659|     GDBusInterfaceSkeleton *interface = G_DBUS_INTERFACE_SKELETON (user_data);
#  660|->   g_dbus_interface_method_dispatch_helper (interface,
#  661|                                              g_dbus_interface_skeleton_get_vtable (interface)->method_call,
#  662|                                              invocation);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def370]
glib-2.84.1/redhat-linux-build/../gio/gdbusobjectmanagerserver.c:482:3: warning[-Wanalyzer-null-argument]: use of NULL ‘child_object_path’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/gdbusobjectmanagerserver.c:592:1: enter_function: entry to ‘g_dbus_object_manager_server_export_uniquely’
glib-2.84.1/redhat-linux-build/../gio/gdbusobjectmanagerserver.c:602:3: branch_false: following ‘false’ branch (when ‘manager’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/gdbusobjectmanagerserver.c:602:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusobjectmanagerserver.c:603:3: branch_false: following ‘false’ branch (when ‘object’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/gdbusobjectmanagerserver.c:603:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusobjectmanagerserver.c:604:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdbusobjectmanagerserver.c:606:18: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusobjectmanagerserver.c:615:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdbusobjectmanagerserver.c:624:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdbusobjectmanagerserver.c:624:3: call_function: calling ‘g_dbus_object_manager_server_export_unlocked’ from ‘g_dbus_object_manager_server_export_uniquely’
#  480|      *
#  481|      * See https://gitlab.gnome.org/GNOME/glib/-/issues/2500 */
#  482|->   g_warn_if_fail (!g_str_equal (child_object_path, manager->priv->object_path_ending_in_slash));
#  483|   
#  484|     return g_str_has_prefix (child_object_path, manager->priv->object_path_ending_in_slash);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def371]
glib-2.84.1/redhat-linux-build/../gio/gdummyfile.c:690:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘encoded’
glib-2.84.1/redhat-linux-build/../gio/gdummyfile.c:333:1: enter_function: entry to ‘g_dummy_file_resolve_relative_path’
glib-2.84.1/redhat-linux-build/../gio/gdummyfile.c:342:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdummyfile.c:352:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gdummyfile.c:354:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gdummyfile.c:355:32: call_function: inlined call to ‘g_strdup_inline’ from ‘g_dummy_file_resolve_relative_path’
glib-2.84.1/redhat-linux-build/../gio/gdummyfile.c:355:9: release_memory: ‘new_decoded_uri.path’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gdummyfile.c:359:13: call_function: calling ‘_g_encode_uri’ from ‘g_dummy_file_resolve_relative_path’
#  688|     static const gchar hex[] = "0123456789ABCDEF";
#  689|   
#  690|->   while ((c = *encoded) != 0)
#  691|       {
#  692|         if (is_valid (c, reserved_chars_allowed))

Error: GCC_ANALYZER_WARNING (CWE-688): [#def372]
glib-2.84.1/redhat-linux-build/../gio/gfdonotificationbackend.c:111:11: warning[-Wanalyzer-null-argument]: use of NULL ‘id’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/gfdonotificationbackend.c:464:1: enter_function: entry to ‘g_fdo_notification_backend_send_notification’
glib-2.84.1/redhat-linux-build/../gio/gfdonotificationbackend.c:493:7: call_function: calling ‘freedesktop_notification_new’ from ‘g_fdo_notification_backend_send_notification’
glib-2.84.1/redhat-linux-build/../gio/gfdonotificationbackend.c:493:7: return_function: returning to ‘g_fdo_notification_backend_send_notification’ from ‘freedesktop_notification_new’
glib-2.84.1/redhat-linux-build/../gio/gfdonotificationbackend.c:495:9: call_function: calling ‘g_fdo_notification_backend_find_notification’ from ‘g_fdo_notification_backend_send_notification’
#  109|       {
#  110|         FreedesktopNotification *n = it->data;
#  111|->       if (g_str_equal (n->id, id))
#  112|           return n;
#  113|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def373]
glib-2.84.1/redhat-linux-build/../gio/gfile.c:2643:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘my_error’
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3362:1: enter_function: entry to ‘file_copy_fallback’
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3379:11: release_memory: ‘tmp_error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3382:10: call_function: calling ‘g_file_query_info’ from ‘file_copy_fallback’
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3382:10: return_function: returning to ‘file_copy_fallback’ from ‘g_file_query_info’
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3387:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3390:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3390:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3398:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3398:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3399:7: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3398:7: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3401:12: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3401:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3408:16: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3409:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3411:16: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3411:16: call_function: calling ‘copy_symlink’ from ‘file_copy_fallback’
# 2641|         /* Maybe it already existed, and we want to overwrite? */
# 2642|         if (!tried_delete && (flags & G_FILE_COPY_OVERWRITE) &&
# 2643|->           my_error->domain == G_IO_ERROR && my_error->code == G_IO_ERROR_EXISTS)
# 2644|           {
# 2645|             g_clear_error (&my_error);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def374]
glib-2.84.1/redhat-linux-build/../gio/gfile.c:2696:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘my_error’
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3362:1: enter_function: entry to ‘file_copy_fallback’
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3379:11: release_memory: ‘tmp_error’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3382:10: call_function: calling ‘g_file_query_info’ from ‘file_copy_fallback’
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3382:10: return_function: returning to ‘file_copy_fallback’ from ‘g_file_query_info’
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3387:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3390:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3390:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3398:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3420:11: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3430:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gfile.c:3430:13: call_function: calling ‘open_source_for_copy’ from ‘file_copy_fallback’
# 2694|   
# 2695|     /* There was an error opening the source, try to set a good error for it: */
# 2696|->   if (my_error->domain == G_IO_ERROR && my_error->code == G_IO_ERROR_IS_DIRECTORY)
# 2697|       {
# 2698|         /* The source is a directory, don't fail with WOULD_RECURSE immediately,

Error: GCC_ANALYZER_WARNING (CWE-686): [#def375]
glib-2.84.1/redhat-linux-build/../gio/gio-launch-desktop.c:253:3: warning[-Wanalyzer-putenv-of-auto-var]: ‘putenv’ on a pointer to automatic variable ‘buf’
glib-2.84.1/redhat-linux-build/../gio/gio-launch-desktop.c:246:6: branch_false: following ‘false’ branch (when ‘argc > 1’)...
glib-2.84.1/redhat-linux-build/../gio/gio-launch-desktop.c:249:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gio-launch-desktop.c:250:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gio-launch-desktop.c:253:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gio-launch-desktop.c:253:3: danger: ‘putenv’ on a pointer to automatic variable ‘buf’
#  251|       return -1;
#  252|   
#  253|->   putenv (buf);
#  254|   
#  255|   #if defined(__linux__) && !defined(__ANDROID__)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def376]
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:1550:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:1996:1: enter_function: entry to ‘g_local_file_trash’
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2020:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2023:16: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2023:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2033:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2034:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2052:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2073:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2100:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2103:16: call_function: calling ‘_g_local_file_find_topdir_for’ from ‘g_local_file_trash’
#argument 1 of ‘__builtin_strlen’ must be non-null
# 1548|   
# 1549|     path_copy = g_strdup (path);
# 1550|->   len = strlen (path_copy);
# 1551|     while (len > 1 && path_copy[len-1] == '/')
# 1552|       path_copy[--len] = 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def377]
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:1608:11: warning[-Wanalyzer-null-argument]: use of NULL ‘target’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:1996:1: enter_function: entry to ‘g_local_file_trash’
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2020:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2023:16: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2023:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2033:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2034:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2052:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2073:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2100:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/glocalfile.c:2103:16: call_function: calling ‘_g_local_file_find_topdir_for’ from ‘g_local_file_trash’
# 1606|     do
# 1607|       {
# 1608|->       if (g_lstat (target, &target_stat) != 0)
# 1609|           {
# 1610|             g_free (target);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def378]
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:188:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘out’
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:178:1: enter_function: entry to ‘canonicalize_filename’
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:186:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:188:7: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:188:7: branch_true: following ‘true’ branch...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:200:15: call_function: calling ‘pop_to_previous_part’ from ‘canonicalize_filename’
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:200:15: return_function: returning to ‘canonicalize_filename’ from ‘pop_to_previous_part’
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:186:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:188:7: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:188:7: release_memory: ‘out’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:188:7: danger: dereference of NULL ‘out’
#  186|     while (*in != 0)
#  187|       {
#  188|->       g_assert (*out == '/');
#  189|   
#  190|         /* move past slashes */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def379]
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:223:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘out’
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:178:1: enter_function: entry to ‘canonicalize_filename’
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:186:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:188:7: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:188:7: branch_true: following ‘true’ branch...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:200:15: call_function: calling ‘pop_to_previous_part’ from ‘canonicalize_filename’
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:200:15: return_function: returning to ‘canonicalize_filename’ from ‘pop_to_previous_part’
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:186:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:223:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:223:7: release_memory: ‘out’ is NULL
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:223:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:223:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gresourcefile.c:223:21: danger: dereference of NULL ‘out’
#  221|   
#  222|     /* Trim trailing / from path */
#  223|->   if (out > bptr && *out == '/')
#  224|       *out = 0;
#  225|     else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def380]
glib-2.84.1/redhat-linux-build/../gio/gsettingsschema.c:1005:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘schema’
glib-2.84.1/redhat-linux-build/../gio/gsettingsschema.c:1000:20: branch_false: following ‘false’ branch (when ‘s’ is NULL)...
glib-2.84.1/redhat-linux-build/../gio/gsettingsschema.c:1004:6: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsettingsschema.c:1004:6: branch_true: following ‘true’ branch (when ‘value’ is NULL)...
glib-2.84.1/redhat-linux-build/../gio/gsettingsschema.c:1005:5: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsettingsschema.c:1005:5: danger: dereference of NULL ‘schema’
# 1003|   
# 1004|     if G_UNLIKELY (value == NULL || !g_variant_is_of_type (value, G_VARIANT_TYPE_TUPLE))
# 1005|->     g_error ("Settings schema '%s' does not contain a key named '%s'", schema->id, key);
# 1006|   
# 1007|     iter = g_variant_iter_new (value);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def381]
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5492:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cmsg’
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5452:3: branch_false: following ‘false’ branch (when ‘socket’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5452:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5453:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5454:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5459:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5462:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5462:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5465:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5465:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5468:6: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5468:6: branch_false: following ‘false’ branch (when ‘num_messages != 0’)...
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5479:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5484:17: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5486:40: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5492:9: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5492:9: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5492:9: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5492:9: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5492:9: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5492:9: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5492:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5492:9: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5492:9: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocket.c:5492:9: danger: dereference of NULL ‘cmsg’
# 5490|           msgvec[i].msg_len = 0;
# 5491|   
# 5492|->         output_message_to_msghdr (msg, (i > 0) ? &messages[i - 1] : NULL,
# 5493|                                     msg_hdr, (i > 0) ? &msgvec[i - 1].msg_hdr : NULL,
# 5494|                                     &child_error);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def382]
glib-2.84.1/redhat-linux-build/../gio/gsocketlistener.c:727:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data.socket’
glib-2.84.1/redhat-linux-build/../gio/gsocketlistener.c:691:1: enter_function: entry to ‘g_socket_listener_accept_socket’
glib-2.84.1/redhat-linux-build/../gio/gsocketlistener.c:698:3: branch_false: following ‘false’ branch (when ‘listener’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/gsocketlistener.c:698:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocketlistener.c:700:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gsocketlistener.c:703:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocketlistener.c:703:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/gsocketlistener.c:716:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/gsocketlistener.c:721:17: call_function: calling ‘add_sources’ from ‘g_socket_listener_accept_socket’
glib-2.84.1/redhat-linux-build/../gio/gsocketlistener.c:721:17: return_function: returning to ‘g_socket_listener_accept_socket’ from ‘add_sources’
glib-2.84.1/redhat-linux-build/../gio/gsocketlistener.c:727:7: danger: use of uninitialized value ‘data.socket’ here
#  725|   			     listener->priv->main_context);
#  726|         g_main_loop_run (loop);
#  727|->       accept_socket = data.socket;
#  728|         free_sources (sources);
#  729|         g_main_loop_unref (loop);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def383]
glib-2.84.1/redhat-linux-build/../gio/gunixmounts.c:225:11: warning[-Wanalyzer-null-argument]: use of NULL ‘value’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/gunixmounts.c:2403:1: enter_function: entry to ‘mount_change_poller’
glib-2.84.1/redhat-linux-build/../gio/gunixmounts.c:2408:20: call_function: calling ‘_g_get_unix_mounts’ from ‘mount_change_poller’
#  223|     for (i = 0; set[i] != NULL; i++)
#  224|       {
#  225|->       if (strcmp (set[i], value) == 0)
#  226|   	return TRUE;
#  227|       }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def384]
glib-2.84.1/redhat-linux-build/../gio/inotify/inotify-sub.c:39:16: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
glib-2.84.1/redhat-linux-build/../gio/inotify/inotify-sub.c:36:1: enter_function: entry to ‘dup_dirname’
glib-2.84.1/redhat-linux-build/../gio/inotify/inotify-sub.c:39:16: danger: argument 1 (‘<unknown>’) NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#   37|   {
#   38|     gchar *d_dirname = g_strdup (dirname);
#   39|->   size_t len = strlen (d_dirname);
#   40|     
#   41|     if (len > 1 && d_dirname[len - 1] == '/')

Error: GCC_ANALYZER_WARNING (CWE-835): [#def385]
glib-2.84.1/redhat-linux-build/../gio/tests/cancellable.c:398:11: warning[-Wanalyzer-infinite-loop]: infinite loop
glib-2.84.1/redhat-linux-build/../gio/tests/cancellable.c:398:11: danger: infinite loop here
glib-2.84.1/redhat-linux-build/../gio/tests/cancellable.c:398:10: branch_true: if it ever follows ‘true’ branch, it will always do so...
 branch_true: ...to here
#  396|     CancellablePollThreadData *thread_data = user_data;
#  397|   
#  398|->   while (!g_atomic_int_get (&thread_data->polling_started))
#  399|       ;
#  400|   

Error: GCC_ANALYZER_WARNING (CWE-835): [#def386]
glib-2.84.1/redhat-linux-build/../gio/tests/cancellable.c:554:11: warning[-Wanalyzer-infinite-loop]: infinite loop
glib-2.84.1/redhat-linux-build/../gio/tests/cancellable.c:554:11: danger: infinite loop here
glib-2.84.1/redhat-linux-build/../gio/tests/cancellable.c:554:10: branch_true: if it ever follows ‘true’ branch, it will always do so...
 branch_true: ...to here
#  552|                            connecting_thread, &thread_data);
#  553|   
#  554|->   while (!g_atomic_pointer_get (&thread_data.loop))
#  555|       ;
#  556|   

Error: GCC_ANALYZER_WARNING (CWE-835): [#def387]
glib-2.84.1/redhat-linux-build/../gio/tests/cancellable.c:649:11: warning[-Wanalyzer-infinite-loop]: infinite loop
glib-2.84.1/redhat-linux-build/../gio/tests/cancellable.c:649:11: danger: infinite loop here
glib-2.84.1/redhat-linux-build/../gio/tests/cancellable.c:649:10: branch_true: if it ever follows ‘true’ branch, it will always do so...
 branch_true: ...to here
#  647|                            connecting_thread, &thread_data);
#  648|   
#  649|->   while (!g_atomic_pointer_get (&thread_data.loop))
#  650|       ;
#  651|   

Error: GCC_ANALYZER_WARNING (CWE-131): [#def388]
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2332:3: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2306:1: enter_function: entry to ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2325:5: call_function: calling ‘strinfo_builder_append_item’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2325:5: return_function: returning to ‘test_strinfo’ from ‘strinfo_builder_append_item’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2326:5: call_function: calling ‘strinfo_builder_append_item’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2326:5: return_function: returning to ‘test_strinfo’ from ‘strinfo_builder_append_item’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2332:3: danger: assigned to ‘const guint32 *’ {{aka ‘const unsigned int *’}} here; ‘sizeof (guint32 {{aka const unsigned int}})’ is ‘4’
# 2330|     }
# 2331|   
# 2332|->   g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "foo"),
# 2333|                      ==, NULL);
# 2334|     g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "bar"),

Error: GCC_ANALYZER_WARNING (CWE-131): [#def389]
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2334:3: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2306:1: enter_function: entry to ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2325:5: call_function: calling ‘strinfo_builder_append_item’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2325:5: return_function: returning to ‘test_strinfo’ from ‘strinfo_builder_append_item’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2326:5: call_function: calling ‘strinfo_builder_append_item’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2326:5: return_function: returning to ‘test_strinfo’ from ‘strinfo_builder_append_item’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2332:3: call_function: calling ‘strinfo_string_from_alias’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2332:3: return_function: returning to ‘test_strinfo’ from ‘strinfo_string_from_alias’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2334:3: danger: assigned to ‘const guint32 *’ {{aka ‘const unsigned int *’}} here; ‘sizeof (guint32 {{aka const unsigned int}})’ is ‘4’
# 2332|     g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "foo"),
# 2333|                      ==, NULL);
# 2334|->   g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "bar"),
# 2335|                      ==, NULL);
# 2336|     g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "baz"),

Error: GCC_ANALYZER_WARNING (CWE-131): [#def390]
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2336:3: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2306:1: enter_function: entry to ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2325:5: call_function: calling ‘strinfo_builder_append_item’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2325:5: return_function: returning to ‘test_strinfo’ from ‘strinfo_builder_append_item’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2326:5: call_function: calling ‘strinfo_builder_append_item’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2326:5: return_function: returning to ‘test_strinfo’ from ‘strinfo_builder_append_item’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2332:3: call_function: calling ‘strinfo_string_from_alias’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2332:3: return_function: returning to ‘test_strinfo’ from ‘strinfo_string_from_alias’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2334:3: call_function: calling ‘strinfo_string_from_alias’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2334:3: return_function: returning to ‘test_strinfo’ from ‘strinfo_string_from_alias’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2336:3: danger: assigned to ‘const guint32 *’ {{aka ‘const unsigned int *’}} here; ‘sizeof (guint32 {{aka const unsigned int}})’ is ‘4’
# 2334|     g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "bar"),
# 2335|                      ==, NULL);
# 2336|->   g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "baz"),
# 2337|                      ==, "bar");
# 2338|     g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "quux"),

Error: GCC_ANALYZER_WARNING (CWE-131): [#def391]
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2338:3: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2306:1: enter_function: entry to ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2325:5: call_function: calling ‘strinfo_builder_append_item’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2325:5: return_function: returning to ‘test_strinfo’ from ‘strinfo_builder_append_item’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2326:5: call_function: calling ‘strinfo_builder_append_item’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2326:5: return_function: returning to ‘test_strinfo’ from ‘strinfo_builder_append_item’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2332:3: call_function: calling ‘strinfo_string_from_alias’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2332:3: return_function: returning to ‘test_strinfo’ from ‘strinfo_string_from_alias’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2334:3: call_function: calling ‘strinfo_string_from_alias’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2334:3: return_function: returning to ‘test_strinfo’ from ‘strinfo_string_from_alias’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2336:3: call_function: calling ‘strinfo_string_from_alias’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2336:3: return_function: returning to ‘test_strinfo’ from ‘strinfo_string_from_alias’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2338:3: danger: assigned to ‘const guint32 *’ {{aka ‘const unsigned int *’}} here; ‘sizeof (guint32 {{aka const unsigned int}})’ is ‘4’
# 2336|     g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "baz"),
# 2337|                      ==, "bar");
# 2338|->   g_assert_cmpstr (strinfo_string_from_alias (strinfo, length, "quux"),
# 2339|                      ==, NULL);
# 2340|   

Error: GCC_ANALYZER_WARNING (CWE-131): [#def392]
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2341:3: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2306:1: enter_function: entry to ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2325:5: call_function: calling ‘strinfo_builder_append_item’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2325:5: return_function: returning to ‘test_strinfo’ from ‘strinfo_builder_append_item’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2326:5: call_function: calling ‘strinfo_builder_append_item’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2326:5: return_function: returning to ‘test_strinfo’ from ‘strinfo_builder_append_item’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2332:3: call_function: calling ‘strinfo_string_from_alias’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2332:3: return_function: returning to ‘test_strinfo’ from ‘strinfo_string_from_alias’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2334:3: call_function: calling ‘strinfo_string_from_alias’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2334:3: return_function: returning to ‘test_strinfo’ from ‘strinfo_string_from_alias’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2336:3: call_function: calling ‘strinfo_string_from_alias’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2336:3: return_function: returning to ‘test_strinfo’ from ‘strinfo_string_from_alias’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2338:3: call_function: calling ‘strinfo_string_from_alias’ from ‘test_strinfo’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2338:3: return_function: returning to ‘test_strinfo’ from ‘strinfo_string_from_alias’
glib-2.84.1/redhat-linux-build/../gio/tests/gsettings.c:2341:3: danger: assigned to ‘const guint32 *’ {{aka ‘const unsigned int *’}} here; ‘sizeof (guint32 {{aka const unsigned int}})’ is ‘4’
# 2339|                      ==, NULL);
# 2340|   
# 2341|->   g_assert_true (strinfo_enum_from_string (strinfo, length, "foo", &result));
# 2342|     g_assert_cmpint (result, ==, 1);
# 2343|     g_assert_true (strinfo_enum_from_string (strinfo, length, "bar", &result));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def393]
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess-testprog.c:163:14: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess-testprog.c:160:6: branch_false: following ‘false’ branch (when ‘argc == 3’)...
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess-testprog.c:166:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess-testprog.c:167:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess-testprog.c:173:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess-testprog.c:173:7: acquire_memory: allocated here
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess-testprog.c:174:6: branch_false: following ‘false’ branch (when ‘f’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess-testprog.c:180:16: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess-testprog.c:181:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess-testprog.c:183:7: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess-testprog.c:163:14: danger: ‘f’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  161|       {
#  162|         g_print ("Usage: %s read-from-fd FD\n", argv[0]);
#  163|->       return 1;
#  164|       }
#  165|   

Error: GCC_ANALYZER_WARNING (CWE-685): [#def394]
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:63:10: warning[-Wanalyzer-va-list-exhausted]: ‘args’ has no more arguments (1 consumed)
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:846:1: enter_function: entry to ‘test_communicate’
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:859:10: call_function: calling ‘get_test_subprocess_args’ from ‘test_communicate’ with 1 variadic argument
#   61|   
#   62|     va_start (args, mode);
#   63|->   while ((arg = va_arg (args, gpointer)) != NULL)
#   64|       g_ptr_array_add (ret, g_strdup (arg));
#   65|     va_end (args);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def395]
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:767:24: warning[-Wanalyzer-null-argument]: use of NULL ‘stdout_data’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:747:9: release_memory: ‘stdout_str’ is NULL
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:747:29: release_memory: ‘stdout_str’ is NULL
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:752:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:756:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:758:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:761:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:761:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:763:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:763:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:765:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:765:11: release_memory: ‘stdout_str’ is NULL
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:765:11: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:765:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:766:11: release_memory: ‘stdout_str’ is NULL
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:767:24: danger: argument 1 (‘stdout_data’) NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
#  765|             g_assert_nonnull (stdout_str);
#  766|             stdout_data = (guint8*)stdout_str;
#  767|->           stdout_len = strlen (stdout_str);
#  768|           }
#  769|         else

Error: GCC_ANALYZER_WARNING (CWE-688): [#def396]
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:1523:16: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:1498:1: enter_function: entry to ‘test_cwd’
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:1510:10: call_function: calling ‘get_test_subprocess_args’ from ‘test_cwd’
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:1510:10: return_function: returning to ‘test_cwd’ from ‘get_test_subprocess_args’
glib-2.84.1/redhat-linux-build/../gio/tests/gsubprocess.c:1523:16: danger: argument 1 (‘splice_to_string(g_subprocess_get_stdout_pipe(g_subprocess_launcher_spawnv(g_subprocess_launcher_new(4), *<unknown>.pdata, & local_error)), &local_error)’) NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
# 1521|     result = splice_to_string (stdout_stream, &local_error);
# 1522|     g_assert_no_error (local_error);
# 1523|->   result_len = strlen (result);
# 1524|   
# 1525|     /* The result should end with a line ending */

Error: GCC_ANALYZER_WARNING (CWE-457): [#def397]
glib-2.84.1/redhat-linux-build/../gio/tests/pollable.c:200:8: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipefds[0]’
glib-2.84.1/redhat-linux-build/../gio/tests/pollable.c:198:3: branch_false: following ‘false’ branch (when ‘status != 0’)...
glib-2.84.1/redhat-linux-build/../gio/tests/pollable.c:198:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/pollable.c:200:8: danger: use of uninitialized value ‘pipefds[0]’ here
#  198|     g_assert_cmpint (status, ==, 0);
#  199|   
#  200|->   in = G_POLLABLE_INPUT_STREAM (g_unix_input_stream_new (pipefds[0], TRUE));
#  201|     out = g_unix_output_stream_new (pipefds[1], TRUE);
#  202|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def398]
glib-2.84.1/redhat-linux-build/../gio/tests/pollable.c:295:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipefds[0]’
glib-2.84.1/redhat-linux-build/../gio/tests/pollable.c:293:3: branch_false: following ‘false’ branch (when ‘status != 0’)...
glib-2.84.1/redhat-linux-build/../gio/tests/pollable.c:293:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/pollable.c:295:11: danger: use of uninitialized value ‘pipefds[0]’ here
#  293|     g_assert_cmpint (status, ==, 0);
#  294|   
#  295|->   ibase = G_INPUT_STREAM (g_unix_input_stream_new (pipefds[0], TRUE));
#  296|     converter = G_CONVERTER (g_charset_converter_new ("UTF-8", "UTF-8", &error));
#  297|     g_assert_no_error (error);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def399]
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:373:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:365:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:371:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:371:3: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:371:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:373:10: danger: dereference of NULL ‘create_server_full(family, 1, & echo_server_thread, 0, & error)’
#  371|     g_assert_nonnull (data);
#  372|   
#  373|->   addr = g_socket_get_local_address (data->server, &error);
#  374|     g_assert_no_error (error);
#  375|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def400]
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:480:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:473:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:480:10: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:480:10: danger: dereference of NULL ‘create_server_full(family, 1, & echo_server_thread, 0, & error)’
#  478|       }
#  479|   
#  480|->   addr = g_socket_get_local_address (data->server, &error);
#  481|     g_assert_no_error (error);
#  482|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def401]
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:619:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:612:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:619:15: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:619:15: danger: dereference of NULL ‘create_server_full(family, 2, & echo_server_dgram_thread, 0, & error)’
#  617|       }
#  618|   
#  619|->   dest_addr = g_socket_get_local_address (data->server, &error);
#  620|     g_assert_no_error (error);
#  621|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def402]
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1002:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:995:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1002:10: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1002:10: danger: dereference of NULL ‘create_server_full(2, 1, &graceful_server_thread, 0, & error)’
# 1000|       }
# 1001|   
# 1002|->   addr = g_socket_get_local_address (data->server, &error);
# 1003|     g_assert_no_error (error);
# 1004|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def403]
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1121:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1090:1: enter_function: entry to ‘test_ipv6_v4mapped’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1098:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1104:10: call_function: inlined call to ‘create_server’ from ‘test_ipv6_v4mapped’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1105:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1112:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1121:10: danger: dereference of NULL ‘create_server_full(10, 1, &v4mapped_server_thread, 1, & error)’
# 1119|     g_socket_set_timeout (client, 1);
# 1120|   
# 1121|->   addr = g_socket_get_local_address (data->server, &error);
# 1122|     g_assert_no_error (error);
# 1123|     iaddr = g_inet_address_new_loopback (G_SOCKET_FAMILY_IPV4);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def404]
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1170:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1147:1: enter_function: entry to ‘test_timed_wait’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1156:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1162:10: call_function: inlined call to ‘create_server’ from ‘test_timed_wait’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1163:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1170:10: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1170:10: danger: dereference of NULL ‘create_server_full(2, 1, &echo_server_thread, 0, & error)’
# 1168|       }
# 1169|   
# 1170|->   addr = g_socket_get_local_address (data->server, &error);
# 1171|     g_assert_no_error (error);
# 1172|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def405]
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1256:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1249:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1256:10: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1256:10: danger: dereference of NULL ‘create_server_full(2, 1, &echo_server_thread, 0, & error)’
# 1254|       }
# 1255|   
# 1256|->   addr = g_socket_get_local_address (data->server, &error);
# 1257|     g_assert_no_error (error);
# 1258|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def406]
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1488:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pv[1]’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1466:3: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1466:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1481:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1485:14: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1488:23: danger: use of uninitialized value ‘pv[1]’ here
# 1486|         connection = create_connection_for_fd (sv[0]);
# 1487|   
# 1488|->       status = close (pv[1]);
# 1489|         g_assert_cmpint (status, ==, 0);
# 1490|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def407]
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1512:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pv[1]’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1466:3: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1466:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1481:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1508:14: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1512:7: danger: use of uninitialized value ‘pv[1]’ here
# 1510|   
# 1511|         err = NULL;
# 1512|->       g_unix_connection_send_fd (G_UNIX_CONNECTION (connection), pv[1], NULL,
# 1513|   				 &err);
# 1514|         g_assert_no_error (err);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def408]
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1536:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pv[0]’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1466:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1468:12: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1481:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1508:14: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:1536:1: danger: ‘pv[0]’ leaks here
# 1534|      * g_unix_connection_receive_credentials().
# 1535|      */
# 1536|-> }
# 1537|   #endif
# 1538|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def409]
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:2036:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:2029:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:2036:10: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:2036:10: danger: dereference of NULL ‘create_server_full(2, 1, &echo_server_thread, 0, & error)’
# 2034|       }
# 2035|   
# 2036|->   addr = g_socket_get_local_address (data->server, &error);
# 2037|     g_assert_no_error (error);
# 2038|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def410]
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:2369:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:2362:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:2369:10: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:2369:10: danger: dereference of NULL ‘create_server_full(2, 1, &echo_server_thread, 0, & error)’
# 2367|       }
# 2368|   
# 2369|->   addr = g_socket_get_local_address (data->server, &error);
# 2370|     g_assert_no_error (error);
# 2371|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def411]
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:2469:15: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:2462:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:2469:15: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/socket.c:2469:15: danger: dereference of NULL ‘create_server_full(2, 2, &echo_server_dgram_thread, 0, & error)’
# 2467|       }
# 2468|   
# 2469|->   dest_addr = g_socket_get_local_address (data->server, &error);
# 2470|     g_assert_no_error (error);
# 2471|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def412]
glib-2.84.1/redhat-linux-build/../gio/tests/unix-fd.c:32:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘my_fd’
glib-2.84.1/redhat-linux-build/../gio/tests/unix-fd.c:22:15: branch_true: following ‘true’ branch (when ‘i != 40’)...
glib-2.84.1/redhat-linux-build/../gio/tests/unix-fd.c:26:15: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/unix-fd.c:26:15: acquire_resource: opened here
glib-2.84.1/redhat-linux-build/../gio/tests/unix-fd.c:30:15: branch_true: following ‘true’ branch (when ‘i != 40’)...
glib-2.84.1/redhat-linux-build/../gio/tests/unix-fd.c:31:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/unix-fd.c:32:1: danger: ‘my_fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   30|     for (i = 0; i < 40; i++)
#   31|       g_close (fd_list[i], NULL);
#   32|-> }
#   33|   
#   34|   static void

Error: GCC_ANALYZER_WARNING (CWE-457): [#def413]
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:444:8: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd[0]’
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:439:15: branch_true: following ‘true’ branch (when ‘i != 1024’)...
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:440:5: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:442:3: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:442:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:444:8: danger: use of uninitialized value ‘fd[0]’ here
#  442|     g_assert_cmpint (pipe (fd), ==, 0);
#  443|   
#  444|->   is = G_UNIX_INPUT_STREAM (g_unix_input_stream_new (fd[0], TRUE));
#  445|     os = G_UNIX_OUTPUT_STREAM (g_unix_output_stream_new (fd[1], TRUE));
#  446|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def414]
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:492:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd[0]’
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:487:15: branch_true: following ‘true’ branch (when ‘i != 1024’)...
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:488:5: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:490:3: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:490:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:492:3: danger: use of uninitialized value ‘fd[0]’ here
#  490|     g_assert_cmpint (pipe (fd), ==, 0);
#  491|   
#  492|->   g_assert_cmpint (fcntl (fd[0], F_SETPIPE_SZ, 4096, NULL), !=, 0);
#  493|     retval = fcntl (fd[0], F_GETPIPE_SZ);
#  494|     g_assert_cmpint (retval, >=, 0);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def415]
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:575:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd[0]’
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:570:15: branch_true: following ‘true’ branch (when ‘i != 1024’)...
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:571:5: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:573:3: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:573:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:575:3: danger: use of uninitialized value ‘fd[0]’ here
#  573|     g_assert_cmpint (pipe (fd), ==, 0);
#  574|   
#  575|->   g_assert_cmpint (fcntl (fd[0], F_SETPIPE_SZ, 4096, NULL), !=, 0);
#  576|     retval = fcntl (fd[0], F_GETPIPE_SZ);
#  577|     g_assert_cmpint (retval, >=, 0);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def416]
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:697:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd[0]’
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:687:3: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:687:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:697:3: danger: use of uninitialized value ‘fd[0]’ here
#  695|      * See https://gitlab.gnome.org/GNOME/glib/issues/1654
#  696|      */
#  697|->   g_unix_set_fd_nonblocking (fd[0], TRUE, NULL);
#  698|     g_unix_set_fd_nonblocking (fd[1], TRUE, NULL);
#  699|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def417]
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:788:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd[0]’
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:778:3: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:778:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/tests/unix-streams.c:788:3: danger: use of uninitialized value ‘fd[0]’ here
#  786|      * See https://gitlab.gnome.org/GNOME/glib/issues/1654
#  787|      */
#  788|->   g_unix_set_fd_nonblocking (fd[0], TRUE, NULL);
#  789|     g_unix_set_fd_nonblocking (fd[1], TRUE, NULL);
#  790|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def418]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:108:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘list’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#  106|     list = calloc (1, sizeof (XdgDirTimeList));
#  107|     list->checked = XDG_CHECKED_UNCHECKED;
#  108|->   list->directory_name = file_name;
#  109|     list->mtime = mtime;
#  110|     list->next = dir_time_list;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def419]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:138:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  136|   
#  137|     file_name = malloc (strlen (directory) + strlen ("/mime.cache") + 1);
#  138|->   strcpy (file_name, directory); strcat (file_name, "/mime.cache");
#  139|     if (stat (file_name, &st) == 0)
#  140|       {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def420]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:158:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  156|   
#  157|     file_name = malloc (strlen (directory) + strlen ("/globs2") + 1);
#  158|->   strcpy (file_name, directory); strcat (file_name, "/globs2");
#  159|     if (stat (file_name, &st) == 0)
#  160|       {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def421]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:168:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  166|         free (file_name);
#  167|         file_name = malloc (strlen (directory) + strlen ("/globs") + 1);
#  168|->       strcpy (file_name, directory); strcat (file_name, "/globs");
#  169|         if (stat (file_name, &st) == 0)
#  170|           {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def422]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:181:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  179|   
#  180|     file_name = malloc (strlen (directory) + strlen ("/magic") + 1);
#  181|->   strcpy (file_name, directory); strcat (file_name, "/magic");
#  182|     if (stat (file_name, &st) == 0)
#  183|       {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def423]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:193:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  191|   
#  192|     file_name = malloc (strlen (directory) + strlen ("/aliases") + 1);
#  193|->   strcpy (file_name, directory); strcat (file_name, "/aliases");
#  194|     _xdg_mime_alias_read_from_file (alias_list, file_name);
#  195|     free (file_name);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def424]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:198:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  196|   
#  197|     file_name = malloc (strlen (directory) + strlen ("/subclasses") + 1);
#  198|->   strcpy (file_name, directory); strcat (file_name, "/subclasses");
#  199|     _xdg_mime_parent_read_from_file (parent_list, file_name);
#  200|     free (file_name);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def425]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:203:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  201|   
#  202|     file_name = malloc (strlen (directory) + strlen ("/icons") + 1);
#  203|->   strcpy (file_name, directory); strcat (file_name, "/icons");
#  204|     _xdg_mime_icon_read_from_file (icon_list, file_name);
#  205|     free (file_name);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def426]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:208:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  206|   
#  207|     file_name = malloc (strlen (directory) + strlen ("/generic-icons") + 1);
#  208|->   strcpy (file_name, directory); strcat (file_name, "/generic-icons");
#  209|     _xdg_mime_icon_read_from_file (generic_icon_list, file_name);
#  210|     free (file_name);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def427]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:250:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘mime_subdir’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  248|   
#  249|         mime_subdir = malloc (strlen (xdg_data_home) + strlen ("/mime/") + 1);
#  250|->       strcpy (mime_subdir, xdg_data_home);
#  251|         strcat (mime_subdir, "/mime/");
#  252|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def428]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:253:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xdg_dirs’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#  251|         strcat (mime_subdir, "/mime/");
#  252|   
#  253|->       xdg_dirs[current_dir++] = mime_subdir;
#  254|       }
#  255|     else if (home != NULL)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def429]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:260:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘guessed_xdg_home’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  258|   
#  259|         guessed_xdg_home = malloc (strlen (home) + strlen ("/.local/share/mime/") + 1);
#  260|->       strcpy (guessed_xdg_home, home);
#  261|         strcat (guessed_xdg_home, "/.local/share/mime/");
#  262|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def430]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:263:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xdg_dirs’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#  261|         strcat (guessed_xdg_home, "/.local/share/mime/");
#  262|   
#  263|->       xdg_dirs[current_dir++] = guessed_xdg_home;
#  264|       }
#  265|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def431]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:300:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xdg_dirs’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:494:1: enter_function: entry to ‘xdg_mime_init’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:510:7: call_function: calling ‘xdg_run_command_on_dirs’ from ‘xdg_mime_init’
#  298|   
#  299|     /* NULL terminator */
#  300|->   xdg_dirs[current_dir] = NULL;
#  301|   
#  302|     need_reread = TRUE;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def432]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:405:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:1020:1: enter_function: entry to ‘_gio_xdg_get_generic_icon’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:1022:3: call_function: calling ‘xdg_mime_init’ from ‘_gio_xdg_get_generic_icon’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  403|     /* Check the mime.cache file */
#  404|     file_name = malloc (strlen (directory) + strlen ("/mime.cache") + 1);
#  405|->   strcpy (file_name, directory); strcat (file_name, "/mime.cache");
#  406|     invalid = xdg_check_file (file_name, &exists);
#  407|     free (file_name);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def433]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:420:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:1020:1: enter_function: entry to ‘_gio_xdg_get_generic_icon’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:1022:3: call_function: calling ‘xdg_mime_init’ from ‘_gio_xdg_get_generic_icon’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  418|     /* Check the globs file */
#  419|     file_name = malloc (strlen (directory) + strlen ("/globs") + 1);
#  420|->   strcpy (file_name, directory); strcat (file_name, "/globs");
#  421|     invalid = xdg_check_file (file_name, NULL);
#  422|     free (file_name);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def434]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:431:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘file_name’ where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:1020:1: enter_function: entry to ‘_gio_xdg_get_generic_icon’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmime.c:1022:3: call_function: calling ‘xdg_mime_init’ from ‘_gio_xdg_get_generic_icon’
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  429|     /* Check the magic file */
#  430|     file_name = malloc (strlen (directory) + strlen ("/magic") + 1);
#  431|->   strcpy (file_name, directory); strcat (file_name, "/magic");
#  432|     invalid = xdg_check_file (file_name, NULL);
#  433|     free (file_name);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def435]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:53:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘list’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:51:10: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:53:3: danger: ‘list’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   51|     list = malloc (sizeof (XdgAliasList));
#   52|   
#   53|->   list->aliases = NULL;
#   54|     list->n_aliases = 0;
#   55|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def436]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:134:11: warning[-Wanalyzer-malloc-leak]: leak of ‘*list.aliases’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:113:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:118:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:120:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:123:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:127:10: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:129:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:131:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:133:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:134:11: danger: ‘*list.aliases’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  132|   	{
#  133|   	  alloc <<= 1;
#  134|-> 	  list->aliases = realloc (list->aliases, 
#  135|   				   alloc * sizeof (XdgAlias));
#  136|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def437]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:141:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:113:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:118:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:120:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:123:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:127:10: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:129:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:131:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:137:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:138:50: acquire_memory: allocated here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:120:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:142:28: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:141:3: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  139|         list->n_aliases++;
#  140|       }
#  141|->   list->aliases = realloc (list->aliases, 
#  142|   			   list->n_aliases * sizeof (XdgAlias));
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-122): [#def438]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:141:19: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:113:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:118:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:141:19: danger: write of ‘(long unsigned int)(*list.n_aliases + 16) * 16’ bytes at offset ‘0’ exceeds the buffer
#  139|         list->n_aliases++;
#  140|       }
#  141|->   list->aliases = realloc (list->aliases, 
#  142|   			   list->n_aliases * sizeof (XdgAlias));
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def439]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:147:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:113:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:118:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:119:3: release_memory: ‘0’ is NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:141:28: release_memory: ‘0’ is NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:146:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:147:5: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:147:12: release_memory: ‘0’ is NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimealias.c:147:5: danger: argument 1 (‘*list.aliases’) NULL where non-null expected
#  145|     
#  146|     if (list->n_aliases > 1)
#  147|->     qsort (list->aliases, list->n_aliases, 
#  148|              sizeof (XdgAlias), alias_entry_cmp);
#  149|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def440]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:1020:31: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘first_seen’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:938:1: enter_function: entry to ‘__gio_xdg_cache_mime_type_subclass’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:948:11: call_function: inlined call to ‘__gio_xdg_cache_unalias_mime_type’ from ‘__gio_xdg_cache_mime_type_subclass’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:949:11: call_function: inlined call to ‘__gio_xdg_cache_unalias_mime_type’ from ‘__gio_xdg_cache_mime_type_subclass’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:949:11: call_function: inlined call to ‘__gio_xdg_cache_unalias_mime_type’ from ‘__gio_xdg_cache_mime_type_subclass’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:951:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:951:6: branch_false: following ‘false’ branch (when the strings are non-equal)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:959:7: call_function: inlined call to ‘is_super_type’ from ‘__gio_xdg_cache_mime_type_subclass’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:959:7: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:965:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:973:6: branch_true: following ‘true’ branch (when ‘seen’ is NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:975:20: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:975:20: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:979:15: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:986:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:986:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:989:21: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:990:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:994:11: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:999:14: branch_true: following ‘true’ branch (when ‘min <= max’)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:1001:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:1005:14: branch_false: following ‘false’ branch (when ‘cmp >= 0’)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:1007:19: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:1007:19: branch_false: following ‘false’ branch (when the strings are equal)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:1011:24: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:1014:27: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:1016:35: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimecache.c:1020:31: danger: ‘*seen + (long unsigned int)k * 8’ could be NULL: unchecked value from [(21)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/20)
# 1018|   
# 1019|   		  /* Detect and avoid buggy circular relationships */
# 1020|-> 		  for (k = 0; (*seen)[k] != NULL; k++)
# 1021|   		    if (parent == (*seen)[k])
# 1022|   		      goto next_parent;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def441]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:120:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new_element’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:563:1: enter_function: entry to ‘__gio_xdg_hash_append_glob’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:571:3: branch_true: following ‘true’ branch (when ‘glob_hash’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: following ‘true’ branch (when ‘glob’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:574:10: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:579:33: call_function: calling ‘_xdg_glob_list_append’ from ‘__gio_xdg_hash_append_glob’
#  118|   
#  119|     new_element = _xdg_glob_list_new ();
#  120|->   new_element->data = strdup (data);
#  121|     new_element->mime_type = strdup (mime_type);
#  122|     new_element->weight = weight;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def442]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:184:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘glob_hash_node’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:563:1: enter_function: entry to ‘__gio_xdg_hash_append_glob’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:571:3: branch_true: following ‘true’ branch (when ‘glob_hash’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: following ‘true’ branch (when ‘glob’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:574:10: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:582:32: call_function: calling ‘_xdg_glob_hash_insert_text’ from ‘__gio_xdg_hash_append_glob’
#  182|       {
#  183|         node = _xdg_glob_hash_node_new ();
#  184|->       node->character = character;
#  185|         node->next = glob_hash_node;
#  186|         glob_hash_node = node;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def443]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:207:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘glob_hash_node’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:563:1: enter_function: entry to ‘__gio_xdg_hash_append_glob’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:571:3: branch_true: following ‘true’ branch (when ‘glob_hash’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: following ‘true’ branch (when ‘glob’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:574:10: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:582:32: call_function: calling ‘_xdg_glob_hash_insert_text’ from ‘__gio_xdg_hash_append_glob’
#  205|   	    {
#  206|   	      node = _xdg_glob_hash_node_new ();
#  207|-> 	      node->character = character;
#  208|   	      node->next = prev_node->next;
#  209|   	      prev_node->next = node;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def444]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:226:11: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘glob_hash_node’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:563:1: enter_function: entry to ‘__gio_xdg_hash_append_glob’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:571:3: branch_true: following ‘true’ branch (when ‘glob_hash’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: following ‘true’ branch (when ‘glob’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:574:10: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:582:32: call_function: calling ‘_xdg_glob_hash_insert_text’ from ‘__gio_xdg_hash_append_glob’
#  224|   	{
#  225|   	  node = _xdg_glob_hash_node_new ();
#  226|-> 	  node->character = character;
#  227|   	  node->next = prev_node->next;
#  228|   	  prev_node->next = node;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def445]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:257:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘glob_hash_node’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:563:1: enter_function: entry to ‘__gio_xdg_hash_append_glob’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:571:3: branch_true: following ‘true’ branch (when ‘glob_hash’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: following ‘true’ branch (when ‘glob’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:574:10: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:582:32: call_function: calling ‘_xdg_glob_hash_insert_text’ from ‘__gio_xdg_hash_append_glob’
#  255|   		  child = _xdg_glob_hash_node_new ();
#  256|   		  child->character = 0;
#  257|-> 		  child->mime_type = strdup (mime_type);
#  258|   		  child->weight = weight;
#  259|   		  child->case_sensitive = case_sensitive;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def446]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:277:10: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:563:1: enter_function: entry to ‘__gio_xdg_hash_append_glob’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:571:3: branch_true: following ‘true’ branch (when ‘glob_hash’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: following ‘true’ branch (when ‘glob’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:574:10: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:582:32: call_function: calling ‘_xdg_glob_hash_insert_text’ from ‘__gio_xdg_hash_append_glob’
#  275|         node->child = _xdg_glob_hash_insert_ucs4 (node->child, text, mime_type, weight, case_sensitive);
#  276|       }
#  277|->   return glob_hash_node;
#  278|   }
#  279|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def447]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:277:10: warning[-Wanalyzer-malloc-leak]: leak of ‘node’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:563:1: enter_function: entry to ‘__gio_xdg_hash_append_glob’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:571:3: branch_true: following ‘true’ branch (when ‘glob_hash’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:572:3: branch_true: following ‘true’ branch (when ‘glob’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:574:10: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeglob.c:582:32: call_function: calling ‘_xdg_glob_hash_insert_text’ from ‘__gio_xdg_hash_append_glob’
#  275|         node->child = _xdg_glob_hash_insert_ucs4 (node->child, text, mime_type, weight, case_sensitive);
#  276|       }
#  277|->   return glob_hash_node;
#  278|   }
#  279|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def448]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:52:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘list’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:50:10: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:52:3: danger: ‘list’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   50|     list = malloc (sizeof (XdgIconList));
#   51|   
#   52|->   list->icons = NULL;
#   53|     list->n_icons = 0;
#   54|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def449]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:133:11: warning[-Wanalyzer-malloc-leak]: leak of ‘*list.icons’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:112:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:117:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:119:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:122:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:126:10: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:128:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:130:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:132:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:133:11: danger: ‘*list.icons’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  131|   	{
#  132|   	  alloc <<= 1;
#  133|-> 	  list->icons = realloc (list->icons, 
#  134|   				   alloc * sizeof (XdgIcon));
#  135|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def450]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:140:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:112:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:117:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:119:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:122:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:126:10: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:128:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:130:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:136:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:137:46: acquire_memory: allocated here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:119:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:141:28: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:140:3: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  138|         list->n_icons++;
#  139|       }
#  140|->   list->icons = realloc (list->icons, 
#  141|   			   list->n_icons * sizeof (XdgIcon));
#  142|   

Error: GCC_ANALYZER_WARNING (CWE-122): [#def451]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:140:17: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:112:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:117:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:140:17: danger: write of ‘(long unsigned int)(*list.n_icons + 16) * 16’ bytes at offset ‘0’ exceeds the buffer
#  138|         list->n_icons++;
#  139|       }
#  140|->   list->icons = realloc (list->icons, 
#  141|   			   list->n_icons * sizeof (XdgIcon));
#  142|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def452]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:146:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:112:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:117:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:118:3: release_memory: ‘0’ is NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:140:26: release_memory: ‘0’ is NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:145:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:146:5: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:146:12: release_memory: ‘0’ is NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeicon.c:146:5: danger: argument 1 (‘*list.icons’) NULL where non-null expected
#  144|     
#  145|     if (list->n_icons > 1)
#  146|->     qsort (list->icons, list->n_icons, 
#  147|              sizeof (XdgIcon), icon_entry_cmp);
#  148|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def453]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeint.c:153:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘out’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeint.c:147:9: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeint.c:151:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeint.c:153:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeint.c:153:7: danger: ‘out + (long unsigned int)i * 4’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  151|     while (*p) 
#  152|       {
#  153|->       out[i++] = _xdg_utf8_to_ucs4 (p);
#  154|         p = _xdg_utf8_next_char (p); 
#  155|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def454]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeint.c:156:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘out’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeint.c:147:9: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeint.c:151:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeint.c:156:6: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeint.c:156:3: danger: ‘out + (long unsigned int)i * 4’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  154|         p = _xdg_utf8_next_char (p); 
#  155|       }
#  156|->   out[i] = 0;
#  157|     *len = i;
#  158|    

Error: GCC_ANALYZER_WARNING (CWE-476): [#def455]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:54:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘list’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:52:10: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:54:3: danger: ‘list’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   52|     list = malloc (sizeof (XdgParentList));
#   53|   
#   54|->   list->parents = NULL;
#   55|     list->n_mimes = 0;
#   56|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def456]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:141:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:120:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:125:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:127:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:130:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:134:10: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:136:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:139:19: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:141:23: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:141:36: release_memory: ‘0’ is NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:141:23: danger: dereference of NULL ‘*list.parents + (long unsigned int)i * 24’
#  139|         for (i = 0; i < list->n_mimes; i++)
#  140|   	{
#  141|-> 	  if (strcmp (list->parents[i].mime, line) == 0)
#  142|   	    {
#  143|   	      entry = &(list->parents[i]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def457]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:153:15: warning[-Wanalyzer-malloc-leak]: leak of ‘*list.parents’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:120:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:125:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:127:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:130:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:134:10: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:136:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:148:10: branch_true: following ‘true’ branch (when ‘entry’ is NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:150:14: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:150:14: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:152:15: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:153:15: danger: ‘*list.parents’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  151|   	    {
#  152|   	      alloc <<= 1;
#  153|-> 	      list->parents = realloc (list->parents, 
#  154|   				       alloc * sizeof (XdgMimeParents));
#  155|   	    }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def458]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:173:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*entry.parents + ((long unsigned int)*entry.n_parents + 18446744073709551615) * 8’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:120:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:125:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:127:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:130:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:134:10: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:136:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:139:19: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:141:23: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:141:14: branch_true: following ‘true’ branch (when the strings are equal)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:148:10: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:148:10: branch_false: following ‘false’ branch (when ‘entry’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:162:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:162:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:164:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:165:28: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:173:7: danger: ‘*entry.parents + ((long unsigned int)*entry.n_parents + 18446744073709551615) * 8’ could be NULL: unchecked value from [(17)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/16)
#  171|   				    (entry->n_parents + 2) * sizeof (char *));
#  172|   	}
#  173|->       entry->parents[entry->n_parents - 1] = strdup (sep);
#  174|         entry->parents[entry->n_parents] = NULL;
#  175|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def459]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:177:3: warning[-Wanalyzer-malloc-leak]: leak of ‘*list.parents’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:120:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:125:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:177:3: danger: ‘*list.parents’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  175|       }
#  176|   
#  177|->   list->parents = realloc (list->parents, 
#  178|   			   list->n_mimes * sizeof (XdgMimeParents));
#  179|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def460]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:177:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:120:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:125:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:127:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:130:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:134:10: branch_false: following ‘false’ branch (when ‘sep’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:136:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:139:19: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:141:23: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:141:14: branch_true: following ‘true’ branch (when the strings are equal)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:148:10: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:148:10: branch_false: following ‘false’ branch (when ‘entry’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:162:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:162:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:164:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:165:28: acquire_memory: allocated here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:177:3: danger: ‘<unknown>’ leaks here; was allocated at [(17)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/16)
#  175|       }
#  176|   
#  177|->   list->parents = realloc (list->parents, 
#  178|   			   list->n_mimes * sizeof (XdgMimeParents));
#  179|   

Error: GCC_ANALYZER_WARNING (CWE-122): [#def461]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:177:19: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:120:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:125:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:177:19: danger: write of ‘(long unsigned int)(*list.n_mimes + 16) * 24’ bytes at offset ‘0’ exceeds the buffer
#  175|       }
#  176|   
#  177|->   list->parents = realloc (list->parents, 
#  178|   			   list->n_mimes * sizeof (XdgMimeParents));
#  179|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def462]
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:183:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:120:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:125:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:126:3: release_memory: ‘0’ is NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:177:28: release_memory: ‘0’ is NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:182:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:183:5: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:183:12: release_memory: ‘0’ is NULL
glib-2.84.1/redhat-linux-build/../gio/xdgmime/xdgmimeparent.c:183:5: danger: argument 1 (‘*list.parents’) NULL where non-null expected
#  181|     
#  182|     if (list->n_mimes > 1)
#  183|->     qsort (list->parents, list->n_mimes, 
#  184|              sizeof (XdgMimeParents), &parent_entry_cmp);
#  185|   }

Error: GCC_ANALYZER_WARNING: [#def463]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:70:28: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:265:9: enter_function: entry to ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:294:9: call_function: calling ‘bdz_alloc_graph3’ from ‘bdz_new’
#   68|   {
#   69|   	graph3->edges=malloc(nedges*sizeof(bdz_edge_t));
#   70|-> 	graph3->first_edge=malloc(nvertices*sizeof(cmph_uint32));
#   71|   	graph3->vert_degree=malloc((size_t)nvertices);	
#   72|   };

Error: GCC_ANALYZER_WARNING: [#def464]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:71:29: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:265:9: enter_function: entry to ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:294:9: call_function: calling ‘bdz_alloc_graph3’ from ‘bdz_new’
#   69|   	graph3->edges=malloc(nedges*sizeof(bdz_edge_t));
#   70|   	graph3->first_edge=malloc(nvertices*sizeof(cmph_uint32));
#   71|-> 	graph3->vert_degree=malloc((size_t)nvertices);	
#   72|   };
#   73|   static void bdz_init_graph3(bdz_graph3_t * graph3, cmph_uint32 nedges, cmph_uint32 nvertices)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def465]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:169:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.vertices[0]’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:265:9: enter_function: entry to ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:294:9: call_function: calling ‘bdz_alloc_graph3’ from ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:294:9: return_function: returning to ‘bdz_new’ from ‘bdz_alloc_graph3’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:312:22: call_function: calling ‘bdz_mapping’ from ‘bdz_new’
#  167|   
#  168|   	for(i=0;i<nedges;i++){
#  169|-> 		v0=graph3->edges[i].vertices[0];
#  170|   		v1=graph3->edges[i].vertices[1];
#  171|   		v2=graph3->edges[i].vertices[2];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def466]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:175:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘marked_edge’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:389:12: enter_function: entry to ‘bdz_mapping’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:397:21: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:410:18: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:410:18: call_function: calling ‘bdz_generate_queue’ from ‘bdz_mapping’
#  173|   				graph3->vert_degree[v1]==1 ||
#  174|   				graph3->vert_degree[v2]==1){
#  175|-> 			if(!GETBIT(marked_edge,i)) {
#  176|   				queue[queue_head++]=i;
#  177|   				SETBIT(marked_edge,i);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def467]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:176:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘queue’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:265:9: enter_function: entry to ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:295:9: call_function: inlined call to ‘bdz_alloc_queue’ from ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:312:22: call_function: calling ‘bdz_mapping’ from ‘bdz_new’
#  174|   				graph3->vert_degree[v2]==1){
#  175|   			if(!GETBIT(marked_edge,i)) {
#  176|-> 				queue[queue_head++]=i;
#  177|   				SETBIT(marked_edge,i);
#  178|   			}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def468]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:354:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:265:9: enter_function: entry to ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:312:22: call_function: calling ‘bdz_mapping’ from ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:312:22: return_function: returning to ‘bdz_new’ from ‘bdz_mapping’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:329:12: branch_false: following ‘false’ branch (when ‘iterations != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:335:9: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:341:9: call_function: calling ‘assigning’ from ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:341:9: return_function: returning to ‘bdz_new’ from ‘assigning’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:353:26: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:354:9: danger: ‘mphf’ could be NULL: unchecked value from [(19)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/18)
#  352|   	#endif
#  353|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  354|-> 	mphf->algo = mph->algo;
#  355|   	bdzf = (bdz_data_t *)malloc(sizeof(bdz_data_t));
#  356|   	bdzf->g = bdz->g;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def469]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:356:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bdzf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:265:9: enter_function: entry to ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:312:22: call_function: calling ‘bdz_mapping’ from ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:312:22: return_function: returning to ‘bdz_new’ from ‘bdz_mapping’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:329:12: branch_false: following ‘false’ branch (when ‘iterations != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:335:9: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:341:9: call_function: calling ‘assigning’ from ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:341:9: return_function: returning to ‘bdz_new’ from ‘assigning’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:355:30: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:356:9: danger: ‘bdzf’ could be NULL: unchecked value from [(19)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/18)
#  354|   	mphf->algo = mph->algo;
#  355|   	bdzf = (bdz_data_t *)malloc(sizeof(bdz_data_t));
#  356|-> 	bdzf->g = bdz->g;
#  357|   	bdz->g = NULL; //transfer memory ownership
#  358|   	bdzf->hl = bdz->hl;

Error: GCC_ANALYZER_WARNING: [#def470]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:422:32: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
#  420|   	cmph_uint8 * marked_vertices =malloc((size_t)(bdz->n >> 3) + 1);
#  421|           cmph_uint32 sizeg = (cmph_uint32)ceil(bdz->n/4.0);
#  422|-> 	bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8));	
#  423|   	memset(marked_vertices, 0, (size_t)(bdz->n >> 3) + 1);
#  424|   	memset(bdz->g, 0xff, (size_t)(sizeg));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def471]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:468:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*bdz.ranktable’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:466:41: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:468:9: danger: ‘calloc((long unsigned int)*bdz.ranktablesize, 4)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  466|   	bdz->ranktable = (cmph_uint32 *)calloc((size_t)bdz->ranktablesize, sizeof(cmph_uint32));
#  467|   	// ranktable computation
#  468|-> 	bdz->ranktable[0] = 0;	
#  469|   	i = 1;
#  470|   	while(1)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def472]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:468:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc((long unsigned int)*bdz.ranktablesize, 4)’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:265:9: enter_function: entry to ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:294:9: call_function: calling ‘bdz_alloc_graph3’ from ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:294:9: return_function: returning to ‘bdz_new’ from ‘bdz_alloc_graph3’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:312:22: call_function: calling ‘bdz_mapping’ from ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:312:22: return_function: returning to ‘bdz_new’ from ‘bdz_mapping’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:314:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:329:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:329:12: branch_false: following ‘false’ branch (when ‘iterations != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:335:9: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:335:9: call_function: calling ‘bdz_partial_free_graph3’ from ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:335:9: return_function: returning to ‘bdz_new’ from ‘bdz_partial_free_graph3’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:341:9: call_function: calling ‘assigning’ from ‘bdz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:341:9: return_function: returning to ‘bdz_new’ from ‘assigning’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:349:9: call_function: calling ‘ranking’ from ‘bdz_new’
#  466|   	bdz->ranktable = (cmph_uint32 *)calloc((size_t)bdz->ranktablesize, sizeof(cmph_uint32));
#  467|   	// ranktable computation
#  468|-> 	bdz->ranktable[0] = 0;	
#  469|   	i = 1;
#  470|   	while(1)

Error: GCC_ANALYZER_WARNING (CWE-789): [#def473]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:543:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
#  541|   	nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
#  542|   	DEBUGP("Hash state has %u bytes\n", buflen);
#  543|-> 	buf = (char *)malloc((size_t)buflen);
#  544|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  545|   	bdz->hl = hash_state_load(buf, buflen);

Error: GCC_ANALYZER_WARNING: [#def474]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz.c:554:32: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
#  552|   	nbytes = fread(&(bdz->r), sizeof(cmph_uint32), (size_t)1, f);	
#  553|   	sizeg = (cmph_uint32)ceil(bdz->n/4.0);
#  554|-> 	bdz->g = (cmph_uint8 *)calloc((size_t)(sizeg), sizeof(cmph_uint8));
#  555|   	nbytes = fread(bdz->g, sizeg*sizeof(cmph_uint8), (size_t)1, f);
#  556|   

Error: GCC_ANALYZER_WARNING: [#def475]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:57:28: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:238:9: enter_function: entry to ‘bdz_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:261:9: call_function: calling ‘bdz_ph_alloc_graph3’ from ‘bdz_ph_new’
#   55|   {
#   56|   	graph3->edges=malloc(nedges*sizeof(bdz_ph_edge_t));
#   57|-> 	graph3->first_edge=malloc(nvertices*sizeof(cmph_uint32));
#   58|   	graph3->vert_degree=malloc((size_t)nvertices);	
#   59|   };

Error: GCC_ANALYZER_WARNING: [#def476]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:58:29: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:238:9: enter_function: entry to ‘bdz_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:261:9: call_function: calling ‘bdz_ph_alloc_graph3’ from ‘bdz_ph_new’
#   56|   	graph3->edges=malloc(nedges*sizeof(bdz_ph_edge_t));
#   57|   	graph3->first_edge=malloc(nvertices*sizeof(cmph_uint32));
#   58|-> 	graph3->vert_degree=malloc((size_t)nvertices);	
#   59|   };
#   60|   static void bdz_ph_init_graph3(bdz_ph_graph3_t * graph3, cmph_uint32 nedges, cmph_uint32 nvertices)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def477]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:156:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.vertices[0]’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:238:9: enter_function: entry to ‘bdz_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:261:9: call_function: calling ‘bdz_ph_alloc_graph3’ from ‘bdz_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:261:9: return_function: returning to ‘bdz_ph_new’ from ‘bdz_ph_alloc_graph3’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:279:22: call_function: calling ‘bdz_ph_mapping’ from ‘bdz_ph_new’
#  154|   
#  155|   	for(i=0;i<nedges;i++){
#  156|-> 		v0=graph3->edges[i].vertices[0];
#  157|   		v1=graph3->edges[i].vertices[1];
#  158|   		v2=graph3->edges[i].vertices[2];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def478]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:162:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘marked_edge’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:353:12: enter_function: entry to ‘bdz_ph_mapping’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:362:21: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:375:18: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:375:18: call_function: calling ‘bdz_ph_generate_queue’ from ‘bdz_ph_mapping’
#  160|   				graph3->vert_degree[v1]==1 ||
#  161|   				graph3->vert_degree[v2]==1){
#  162|-> 			if(!GETBIT(marked_edge,i)) {
#  163|   				queue[queue_head++]=i;
#  164|   				SETBIT(marked_edge,i);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def479]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:163:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘queue’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:238:9: enter_function: entry to ‘bdz_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:262:9: call_function: inlined call to ‘bdz_ph_alloc_queue’ from ‘bdz_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:279:22: call_function: calling ‘bdz_ph_mapping’ from ‘bdz_ph_new’
#  161|   				graph3->vert_degree[v2]==1){
#  162|   			if(!GETBIT(marked_edge,i)) {
#  163|-> 				queue[queue_head++]=i;
#  164|   				SETBIT(marked_edge,i);
#  165|   			}

Error: GCC_ANALYZER_WARNING: [#def480]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:387:35: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
#  385|   	cmph_uint8 * marked_vertices =malloc((size_t)(bdz_ph->n >> 3) + 1);
#  386|   	cmph_uint32 sizeg = (cmph_uint32)ceil(bdz_ph->n/4.0);
#  387|-> 	bdz_ph->g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8));	
#  388|   	memset(marked_vertices, 0, (size_t)(bdz_ph->n >> 3) + 1);
#  389|   	//memset(bdz_ph->g, 0xff, sizeg);

Error: GCC_ANALYZER_WARNING: [#def481]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:432:44: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
#  430|   	cmph_uint8 byte = 0;
#  431|   	cmph_uint32 sizeg = (cmph_uint32)ceil(bdz_ph->n/5.0);
#  432|-> 	cmph_uint8 * new_g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8));	
#  433|   	cmph_uint8 value;
#  434|   	cmph_uint32 idx;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def482]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:438:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new_g’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:432:44: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:435:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:437:13: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:438:13: danger: ‘new_g + (sizetype)idx’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  436|   	{	
#  437|               idx = i/5;
#  438|->             byte = new_g[idx];
#  439|               value = GETVALUE(bdz_ph->g, i);
#  440|               byte = (cmph_uint8) (byte + value*pow3_table[i%5U]);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def483]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:498:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
#  496|   	nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
#  497|   	DEBUGP("Hash state has %u bytes\n", buflen);
#  498|-> 	buf = (char *)malloc((size_t)buflen);
#  499|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  500|   	bdz_ph->hl = hash_state_load(buf, buflen);

Error: GCC_ANALYZER_WARNING: [#def484]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bdz_ph.c:509:35: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
#  507|   	nbytes = fread(&(bdz_ph->r), sizeof(cmph_uint32), (size_t)1, f);	
#  508|   	sizeg = (cmph_uint32)ceil(bdz_ph->n/5.0);
#  509|-> 	bdz_ph->g = (cmph_uint8 *)calloc((size_t)sizeg, sizeof(cmph_uint8));
#  510|   	nbytes = fread(bdz_ph->g, sizeg*sizeof(cmph_uint8), (size_t)1, f);
#  511|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def485]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bitbool.h:121:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bits_table’
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:37:6: enter_function: entry to ‘compressed_rank_generate’
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:50:41: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:53:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:55:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:55:17: call_function: calling ‘set_bits_value’ from ‘compressed_rank_generate’
#  119|   	register cmph_uint32 shift2 = 32 - shift1;
#  120|   	
#  121|-> 	bits_table[word_idx] &= ~((string_mask) << shift1);
#  122|   	bits_table[word_idx] |= bits_string << shift1;
#  123|   	

Error: GCC_ANALYZER_WARNING (CWE-1335): [#def486]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bitbool.h:126:44: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘32’) >= precision of type (‘32’)
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:37:6: enter_function: entry to ‘compressed_rank_generate’
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:53:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:55:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:55:17: call_function: calling ‘set_bits_value’ from ‘compressed_rank_generate’
#  124|   	if(shift2 < string_length)
#  125|   	{
#  126|-> 		bits_table[word_idx+1] &= ~((string_mask) >> shift2);
#  127|   		bits_table[word_idx+1] |= bits_string >> shift2;
#  128|   	};

Error: GCC_ANALYZER_WARNING (CWE-1335): [#def487]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bitbool.h:127:43: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘32’) >= precision of type (‘32’)
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:37:6: enter_function: entry to ‘compressed_rank_generate’
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:53:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:55:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:55:17: call_function: calling ‘set_bits_value’ from ‘compressed_rank_generate’
#  125|   	{
#  126|   		bits_table[word_idx+1] &= ~((string_mask) >> shift2);
#  127|-> 		bits_table[word_idx+1] |= bits_string >> shift2;
#  128|   	};
#  129|   };

Error: GCC_ANALYZER_WARNING (CWE-1335): [#def488]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bitbool.h:142:32: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘32’) >= precision of type (‘32’)
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:272:13: enter_function: entry to ‘compressed_rank_query_packed’
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:291:11: branch_false: following ‘false’ branch (when ‘max_val >= idx’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:296:9: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:299:11: branch_true: following ‘true’ branch (when ‘val_quot == 0’)...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:311:19: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:315:20: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:315:20: call_function: calling ‘get_bits_value’ from ‘compressed_rank_query_packed’
#  140|   	
#  141|   	if(shift2 < string_length)
#  142|-> 		bits_string |= (bits_table[word_idx+1] << shift2) & string_mask;
#  143|   
#  144|   	return bits_string;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def489]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bitbool.h:154:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bits_table’
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:45:6: enter_function: entry to ‘compressed_seq_generate’
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:56:20: branch_true: following ‘true’ branch (when ‘i < n’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:58:30: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:73:43: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:76:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:78:30: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:78:19: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:80:63: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:81:17: call_function: calling ‘set_bits_at_pos’ from ‘compressed_seq_generate’
#  152|   	register cmph_uint32 string_mask = (1U << string_length) - 1;
#  153|   	
#  154|-> 	bits_table[word_idx] &= ~((string_mask) << shift1);
#  155|   	bits_table[word_idx] |= bits_string << shift1;
#  156|   	if(shift2 < string_length)

Error: GCC_ANALYZER_WARNING (CWE-1335): [#def490]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bitbool.h:158:44: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘32’) >= precision of type (‘32’)
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:45:6: enter_function: entry to ‘compressed_seq_generate’
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:56:20: branch_true: following ‘true’ branch (when ‘i < n’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:58:30: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:76:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:78:30: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:78:19: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:80:63: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:81:17: call_function: calling ‘set_bits_at_pos’ from ‘compressed_seq_generate’
#  156|   	if(shift2 < string_length)
#  157|   	{
#  158|-> 		bits_table[word_idx+1] &= ~((string_mask) >> shift2);
#  159|   		bits_table[word_idx+1] |= bits_string >> shift2;
#  160|   	}

Error: GCC_ANALYZER_WARNING (CWE-1335): [#def491]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bitbool.h:159:43: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘32’) >= precision of type (‘32’)
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:45:6: enter_function: entry to ‘compressed_seq_generate’
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:56:20: branch_true: following ‘true’ branch (when ‘i < n’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:58:30: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:76:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:78:30: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:78:19: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:80:63: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:81:17: call_function: calling ‘set_bits_at_pos’ from ‘compressed_seq_generate’
#  157|   	{
#  158|   		bits_table[word_idx+1] &= ~((string_mask) >> shift2);
#  159|-> 		bits_table[word_idx+1] |= bits_string >> shift2;
#  160|   	}
#  161|   };

Error: GCC_ANALYZER_WARNING (CWE-1335): [#def492]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bitbool.h:174:32: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘32’) >= precision of type (‘32’)
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:339:13: enter_function: entry to ‘compressed_seq_query_packed’
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:361:11: branch_true: following ‘true’ branch (when ‘idx == 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:364:27: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:379:11: branch_false: following ‘false’ branch (when ‘enc_length != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:382:24: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:382:24: call_function: calling ‘get_bits_at_pos’ from ‘compressed_seq_query_packed’
#  172|   
#  173|   	if(shift2 < string_length)
#  174|-> 		bits_string |= (bits_table[word_idx+1] << shift2) & string_mask;
#  175|   	return bits_string;
#  176|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def493]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:79:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*bmz.hashes + (long unsigned int)i * 8’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:78:40: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:79:20: branch_true: following ‘true’ branch (when ‘i != 3’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:79:32: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:79:32: danger: ‘*bmz.hashes + (long unsigned int)i * 8’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   77|   
#   78|   	bmz->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*3);
#   79|-> 	for(i = 0; i < 3; ++i) bmz->hashes[i] = NULL;
#   80|   
#   81|   	do

Error: GCC_ANALYZER_WARNING (CWE-476): [#def494]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:144:64: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘visited’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:79:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:79:20: branch_false: following ‘false’ branch (when ‘i == 3’)...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:100:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:116:14: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:116:14: branch_false: following ‘false’ branch (when ‘iterations != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:122:15: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:135:35: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:141:11: branch_true: following ‘true’ branch...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:142:23: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:144:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:144:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:144:64: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:144:64: danger: ‘visited + (sizetype)(i >> 3)’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  142|   	  for (i = 0; i < bmz->n; ++i) // critical nodes
#  143|   	  {
#  144|->                 if (graph_node_is_critical(bmz->graph, i) && (!GETBIT(visited,i)))
#  145|   		{
#  146|   		  if(c > 1.14) restart_mapping = bmz_traverse_critical_nodes(bmz, i, &biggest_g_value, &biggest_edge_value, used_edges, visited);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def495]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:324:49: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘unused_g_values’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:277:15: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:279:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:281:24: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:283:29: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:283:28: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:287:39: branch_true: following ‘true’ branch (when ‘collision != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:289:44: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:289:44: branch_false: following ‘false’ branch (when ‘nunused_g_values <= next_g_index’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:295:58: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:304:59: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:310:61: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:317:43: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:319:51: branch_true: following ‘true’ branch (when ‘unused_g_values_capacity == nunused_g_values’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:321:115: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:324:64: release_memory: ‘unused_g_values’ is NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:324:49: danger: dereference of NULL ‘unused_g_values + (long unsigned int)nunused_g_values * 4’
#  322|   						        unused_g_values_capacity += BUFSIZ;  							
#  323|   						} 
#  324|-> 						unused_g_values[nunused_g_values++] = next_g;							
#  325|   
#  326|   					}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def496]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:359:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘used_edges’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:58:9: enter_function: entry to ‘bmz_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:79:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:79:20: branch_false: following ‘false’ branch (when ‘i == 3’)...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:100:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:116:14: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:116:14: branch_false: following ‘false’ branch (when ‘iterations != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:122:15: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:137:38: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:141:11: branch_true: following ‘true’ branch...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:142:23: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:151:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:151:13: branch_true: following ‘true’ branch (when ‘restart_mapping == 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:153:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:157:17: call_function: calling ‘bmz_traverse_non_critical_nodes’ from ‘bmz_new’
#  357|          {
#  358|   		assert(unused_edge_index < bmz->m);
#  359|-> 		if(GETBIT(used_edges, unused_edge_index)) unused_edge_index ++;
#  360|   		else break;
#  361|          }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def497]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:500:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bmz’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:495:41: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:500:9: danger: ‘bmz’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  498|   	mphf->data = bmz;
#  499|   	nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f);
#  500|-> 	bmz->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1));
#  501|   	bmz->hashes[nhashes] = NULL;
#  502|   	DEBUGP("Reading %u hashes\n", nhashes);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def498]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:500:40: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(long unsigned int)(nhashes + 1) * 8’ as allocation size without upper-bounds checking
#  498|   	mphf->data = bmz;
#  499|   	nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f);
#  500|-> 	bmz->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1));
#  501|   	bmz->hashes[nhashes] = NULL;
#  502|   	DEBUGP("Reading %u hashes\n", nhashes);

Error: GCC_ANALYZER_WARNING (CWE-823): [#def499]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:501:9: warning[-Wanalyzer-tainted-offset]: use of attacker-controlled value ‘(long unsigned int)nhashes * 8’ as offset without upper-bounds checking
#  499|   	nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f);
#  500|   	bmz->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1));
#  501|-> 	bmz->hashes[nhashes] = NULL;
#  502|   	DEBUGP("Reading %u hashes\n", nhashes);
#  503|   	for (i = 0; i < nhashes; ++i)

Error: GCC_ANALYZER_WARNING (CWE-789): [#def500]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:508:31: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:503:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:506:26: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:508:31: danger: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
#  506|   		nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
#  507|   		DEBUGP("Hash state has %u bytes\n", buflen);
#  508|-> 		buf = (char *)malloc((size_t)buflen);
#  509|   		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  510|   		state = hash_state_load(buf, buflen);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def501]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:516:18: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:500:40: acquire_memory: allocated here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:503:21: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:516:24: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz.c:516:18: danger: ‘<unknown>’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  514|   
#  515|   	DEBUGP("Reading m and n\n");
#  516|-> 	nbytes = fread(&(bmz->n), sizeof(cmph_uint32), (size_t)1, f);	
#  517|   	nbytes = fread(&(bmz->m), sizeof(cmph_uint32), (size_t)1, f);	
#  518|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def502]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:83:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*bmz8.hashes + (long unsigned int)i * 8’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:69:12: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:74:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:82:41: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:83:20: branch_true: following ‘true’ branch (when ‘i != 3’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:83:32: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:83:32: danger: ‘*bmz8.hashes + (long unsigned int)i * 8’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   81|   
#   82|   	bmz8->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*3);
#   83|-> 	for(i = 0; i < 3; ++i) bmz8->hashes[i] = NULL;
#   84|   
#   85|   	do

Error: GCC_ANALYZER_WARNING (CWE-476): [#def503]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:150:65: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘visited’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:69:12: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:74:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:83:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:83:20: branch_false: following ‘false’ branch (when ‘i == 3’)...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:104:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:120:14: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:120:14: branch_false: following ‘false’ branch (when ‘iterations != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:127:15: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:141:35: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:147:11: branch_true: following ‘true’ branch...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:148:23: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:150:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:150:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:150:65: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:150:65: danger: ‘visited + (sizetype)(i >> 3)’ could be NULL: unchecked value from [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#  148|   	  for (i = 0; i < bmz8->n; ++i) // critical nodes
#  149|   	  {
#  150|->                 if (graph_node_is_critical(bmz8->graph, i) && (!GETBIT(visited,i)))
#  151|   		{
#  152|   		  if(c > 1.14) restart_mapping = bmz8_traverse_critical_nodes(bmz8, i, &biggest_g_value, &biggest_edge_value, used_edges, visited);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def504]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:333:49: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘unused_g_values’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:286:15: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:288:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:290:24: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:292:29: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:292:28: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:296:39: branch_true: following ‘true’ branch (when ‘collision != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:298:44: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:298:44: branch_false: following ‘false’ branch (when ‘nunused_g_values <= next_g_index’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:304:71: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:313:59: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:319:61: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:326:43: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:328:51: branch_true: following ‘true’ branch (when ‘nunused_g_values == 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:330:88: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:333:64: release_memory: ‘unused_g_values’ is NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:333:49: danger: dereference of NULL ‘unused_g_values + (sizetype)nunused_g_values’
#  331|   						        unused_g_values_capacity += (cmph_uint8)BUFSIZ;  							
#  332|   						} 
#  333|-> 						unused_g_values[nunused_g_values++] = next_g;							
#  334|   
#  335|   					}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def505]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:372:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘used_edges’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:57:9: enter_function: entry to ‘bmz8_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:69:12: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:74:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:83:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:83:20: branch_false: following ‘false’ branch (when ‘i == 3’)...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:104:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:120:14: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:120:14: branch_false: following ‘false’ branch (when ‘iterations != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:127:15: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:143:38: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:147:11: branch_true: following ‘true’ branch...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:148:23: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:157:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:157:13: branch_true: following ‘true’ branch (when ‘restart_mapping == 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:159:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:163:17: call_function: calling ‘bmz8_traverse_non_critical_nodes’ from ‘bmz8_new’
#  370|          {
#  371|   		assert(unused_edge_index < bmz8->m);
#  372|-> 		if(GETBIT(used_edges, unused_edge_index)) unused_edge_index ++;
#  373|   		else break;
#  374|          }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def506]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:510:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bmz8’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:505:44: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:510:9: danger: ‘bmz8’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  508|   	mphf->data = bmz8;
#  509|   	nbytes = fread(&nhashes, sizeof(cmph_uint8), (size_t)1, f);
#  510|-> 	bmz8->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(size_t)(nhashes + 1));
#  511|   	bmz8->hashes[nhashes] = NULL;
#  512|   	DEBUGP("Reading %u hashes\n", nhashes);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def507]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:510:41: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(long unsigned int)((int)nhashes + 1) * 8’ as allocation size without upper-bounds checking
#  508|   	mphf->data = bmz8;
#  509|   	nbytes = fread(&nhashes, sizeof(cmph_uint8), (size_t)1, f);
#  510|-> 	bmz8->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(size_t)(nhashes + 1));
#  511|   	bmz8->hashes[nhashes] = NULL;
#  512|   	DEBUGP("Reading %u hashes\n", nhashes);

Error: GCC_ANALYZER_WARNING (CWE-823): [#def508]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:511:9: warning[-Wanalyzer-tainted-offset]: use of attacker-controlled value ‘(long unsigned int)nhashes * 8’ as offset without upper-bounds checking
#  509|   	nbytes = fread(&nhashes, sizeof(cmph_uint8), (size_t)1, f);
#  510|   	bmz8->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(size_t)(nhashes + 1));
#  511|-> 	bmz8->hashes[nhashes] = NULL;
#  512|   	DEBUGP("Reading %u hashes\n", nhashes);
#  513|   	for (i = 0; i < nhashes; ++i)

Error: GCC_ANALYZER_WARNING (CWE-789): [#def509]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:518:31: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:513:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:516:26: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:518:31: danger: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
#  516|   		nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
#  517|   		DEBUGP("Hash state has %u bytes\n", buflen);
#  518|-> 		buf = (char *)malloc((size_t)buflen);
#  519|   		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  520|   		state = hash_state_load(buf, buflen);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def510]
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:526:18: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:510:41: acquire_memory: allocated here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:513:21: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:526:24: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/bmz8.c:526:18: danger: ‘<unknown>’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  524|   
#  525|   	DEBUGP("Reading m and n\n");
#  526|-> 	nbytes = fread(&(bmz8->n), sizeof(cmph_uint8), (size_t)1, f);	
#  527|   	nbytes = fread(&(bmz8->m), sizeof(cmph_uint8), (size_t)1, f);	
#  528|   

Error: GCC_ANALYZER_WARNING: [#def511]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:153:38: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
#  151|           brz->k = (cmph_uint32)ceil(brz->m/((double)brz->b));
#  152|   	DEBUGP("k: %u\n", brz->k);
#  153|-> 	brz->size   = (cmph_uint8 *) calloc((size_t)brz->k, sizeof(cmph_uint8));
#  154|   	
#  155|   	// Clustering the keys by graph id.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def512]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:263:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buckets_size’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:232:52: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:256:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:259:28: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:263:25: danger: ‘buckets_size’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  261|   				fprintf(stderr, "Flushing  %u\n", nkeys_in_buffer);
#  262|   			}
#  263|-> 			value = buckets_size[0];
#  264|   			sum = 0;
#  265|   			keylen1 = 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def513]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:286:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘filename’ where non-null expected
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:256:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:259:28: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:277:36: branch_false: following ‘false’ branch (when ‘i >= nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:285:66: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:285:44: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:286:25: danger: argument 1 (‘filename’) from [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected
#argument 1 of ‘__builtin_sprintf’ must be non-null
#  284|   			}
#  285|   			filename = (char *)calloc(strlen((char *)(brz->tmp_dir)) + 11, sizeof(char));
#  286|-> 			sprintf(filename, "%s%u.cmph",brz->tmp_dir, nflushes);
#  287|   			tmp_fd = fopen(filename, "wb");
#  288|   			free(filename);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def514]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:292:59: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘keys_index’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:256:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:302:17: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:60: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:256:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:259:28: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:267:36: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:276:53: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:276:53: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:277:36: branch_true: following ‘true’ branch (when ‘i < nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:279:33: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:277:36: branch_false: following ‘false’ branch (when ‘i >= nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:285:66: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:290:36: branch_true: following ‘true’ branch (when ‘i < nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:292:69: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:292:59: danger: ‘keys_index + (long unsigned int)i * 4’ could be NULL: unchecked value from [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
#  290|   			for(i = 0; i < nkeys_in_buffer; i++)
#  291|   			{
#  292|-> 				memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1));
#  293|   				nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd);
#  294|   			}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def515]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:293:42: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen(filename, "wb")’ where non-null expected
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:256:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:302:17: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:60: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:256:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:259:28: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:267:36: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:276:53: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:277:36: branch_true: following ‘true’ branch (when ‘i < nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:279:33: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:277:36: branch_false: following ‘false’ branch (when ‘i >= nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:285:66: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:287:34: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:290:36: branch_true: following ‘true’ branch (when ‘i < nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:292:69: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:293:42: danger: argument 4 (‘fopen(filename, "wb")’) from [(17)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/16) could be NULL where non-null expected
#  291|   			{
#  292|   				memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1));
#  293|-> 				nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd);
#  294|   			}
#  295|   			nkeys_in_buffer = 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def516]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:300:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen(filename, "wb")’ where non-null expected
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:256:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:259:28: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:277:36: branch_false: following ‘false’ branch (when ‘i >= nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:285:66: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:287:34: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:290:36: branch_false: following ‘false’ branch (when ‘i >= nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:297:57: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:300:25: danger: argument 1 (‘fopen(filename, "wb")’) from [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected
#  298|   			nflushes++;
#  299|   			free(keys_index);
#  300|-> 			fclose(tmp_fd);
#  301|   		}
#  302|   		memcpy(buffer + memory_usage, &keylen, sizeof(keylen));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def517]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:302:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buffer’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:231:44: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:256:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:302:17: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:302:17: danger: ‘buffer + (sizetype)memory_usage’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  300|   			fclose(tmp_fd);
#  301|   		}
#  302|-> 		memcpy(buffer + memory_usage, &keylen, sizeof(keylen));
#  303|   		memcpy(buffer + memory_usage + sizeof(keylen), key, (size_t)keylen);
#  304|   		memory_usage += keylen + (cmph_uint32)sizeof(keylen);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def518]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:326:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buckets_size’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:232:52: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:256:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:302:17: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:60: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:318:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:318:12: branch_true: following ‘true’ branch (when ‘memory_usage != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:322:20: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:326:17: danger: ‘buckets_size’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  324|   			fprintf(stderr, "Flushing  %u\n", nkeys_in_buffer);
#  325|   		}
#  326|-> 		value = buckets_size[0];
#  327|   		sum = 0;
#  328|   		keylen1 = 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def519]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:348:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘filename’ where non-null expected
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:60: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:318:12: branch_true: following ‘true’ branch (when ‘memory_usage != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:322:20: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:330:28: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:338:45: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:339:28: branch_true: following ‘true’ branch (when ‘i < nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:341:25: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:339:28: branch_false: following ‘false’ branch (when ‘i >= nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:347:58: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:347:36: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:348:17: danger: argument 1 (‘filename’) from [(13)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/12) could be NULL where non-null expected
#argument 1 of ‘__builtin_sprintf’ must be non-null
#  346|   		}
#  347|   		filename = (char *)calloc(strlen((char *)(brz->tmp_dir)) + 11, sizeof(char));
#  348|-> 		sprintf(filename, "%s%u.cmph",brz->tmp_dir, nflushes);
#  349|   		tmp_fd = fopen(filename, "wb");
#  350|   		free(filename);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def520]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:354:51: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘keys_index’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:60: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:318:12: branch_true: following ‘true’ branch (when ‘memory_usage != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:322:20: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:330:28: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:338:45: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:338:45: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:339:28: branch_true: following ‘true’ branch (when ‘i < nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:341:25: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:339:28: branch_false: following ‘false’ branch (when ‘i >= nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:347:58: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:352:28: branch_true: following ‘true’ branch (when ‘i < nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:354:61: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:354:51: danger: ‘keys_index + (long unsigned int)i * 4’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
#  352|   		for(i = 0; i < nkeys_in_buffer; i++)
#  353|   		{
#  354|-> 			memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1));
#  355|   			nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd);
#  356|   		}

Error: GCC_ANALYZER_WARNING (CWE-688): [#def521]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:355:34: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘fopen(filename, "wb")’ where non-null expected
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:60: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:318:12: branch_true: following ‘true’ branch (when ‘memory_usage != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:322:20: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:330:28: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:338:45: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:339:28: branch_true: following ‘true’ branch (when ‘i < nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:341:25: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:339:28: branch_false: following ‘false’ branch (when ‘i >= nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:347:58: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:349:26: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:352:28: branch_true: following ‘true’ branch (when ‘i < nkeys_in_buffer’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:354:61: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:355:34: danger: argument 4 (‘fopen(filename, "wb")’) from [(13)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/12) could be NULL where non-null expected
#  353|   		{
#  354|   			memcpy(&keylen1, buffer + keys_index[i], sizeof(keylen1));
#  355|-> 			nbytes = fwrite(buffer + keys_index[i], (size_t)1, keylen1 + sizeof(keylen1), tmp_fd);
#  356|   		}
#  357|   		nkeys_in_buffer = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def522]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:411:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buffer_h0’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:225:12: enter_function: entry to ‘brz_gen_mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:232:52: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:60: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:367:11: branch_false: following ‘false’ branch (when ‘nflushes <= 1024’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:369:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:388:39: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:391:20: branch_false: following ‘false’ branch (when ‘i >= nflushes’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:405:34: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:408:15: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: call_function: calling ‘brz_min_index’ from ‘brz_gen_mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: return_function: returning to ‘brz_gen_mphf’ from ‘brz_min_index’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:411:17: danger: ‘buffer_h0 + (long unsigned int)brz_min_index(buffer_h0,  nflushes) * 4’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/8)
#  409|   	{
#  410|   		i = brz_min_index(buffer_h0, nflushes);
#  411|-> 		cur_bucket = buffer_h0[i];
#  412|   		key = (char *)buffer_manager_read_key(buff_manager, i, &keylen);
#  413|   		if(key)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def523]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:420:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘keys_vd’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:225:12: enter_function: entry to ‘brz_gen_mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:60: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:367:11: branch_false: following ‘false’ branch (when ‘nflushes <= 1024’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:369:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:391:20: branch_false: following ‘false’ branch (when ‘i >= nflushes’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:405:34: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:405:34: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:408:15: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: call_function: calling ‘brz_min_index’ from ‘brz_gen_mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: return_function: returning to ‘brz_gen_mphf’ from ‘brz_min_index’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:413:19: branch_true: following ‘true’ branch...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:415:31: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:418:38: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:419:36: branch_false: following ‘false’ branch (when ‘cur_bucket == h0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:420:41: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:420:33: danger: ‘keys_vd + (long unsigned int)nkeys_vd * 8’ could be NULL: unchecked value from [(10)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/9)
#  418|   				h0 = hash(brz->h0, key+sizeof(keylen), keylen) % brz->k;
#  419|   				if (h0 != buffer_h0[i]) break;
#  420|-> 				keys_vd[nkeys_vd++] = (cmph_uint8 *)key;
#  421|   				key = NULL; //transfer memory ownership
#  422|   				e++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def524]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:428:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘keys_vd’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:225:12: enter_function: entry to ‘brz_gen_mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:60: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:367:11: branch_false: following ‘false’ branch (when ‘nflushes <= 1024’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:369:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:391:20: branch_false: following ‘false’ branch (when ‘i >= nflushes’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:405:34: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:405:34: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:408:15: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: call_function: calling ‘brz_min_index’ from ‘brz_gen_mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: return_function: returning to ‘brz_gen_mphf’ from ‘brz_min_index’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:413:19: branch_true: following ‘true’ branch...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:415:31: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:418:38: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:419:36: branch_true: following ‘true’ branch (when ‘cur_bucket != h0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:425:29: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:425:28: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:427:33: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:427:33: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:428:67: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:428:33: danger: ‘keys_vd + (long unsigned int)nkeys_vd * 8’ could be NULL: unchecked value from [(10)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/9)
#  426|   			{
#  427|   				assert(nkeys_vd < brz->size[cur_bucket]);
#  428|-> 				keys_vd[nkeys_vd++] = buffer_merge[i];
#  429|   				buffer_merge[i] = NULL; //transfer memory ownership
#  430|   				e++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def525]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:428:55: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buffer_merge’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:225:12: enter_function: entry to ‘brz_gen_mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:60: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:367:11: branch_false: following ‘false’ branch (when ‘nflushes <= 1024’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:369:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:387:39: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:391:20: branch_false: following ‘false’ branch (when ‘i >= nflushes’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:405:34: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:408:15: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: call_function: calling ‘brz_min_index’ from ‘brz_gen_mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: return_function: returning to ‘brz_gen_mphf’ from ‘brz_min_index’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:413:19: branch_true: following ‘true’ branch...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:415:31: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:418:38: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:419:36: branch_true: following ‘true’ branch (when ‘cur_bucket != h0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:425:29: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:425:28: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:427:33: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:427:33: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:428:67: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:428:55: danger: ‘buffer_merge + (long unsigned int)brz_min_index(buffer_h0,  nflushes) * 8’ could be NULL: unchecked value from [(8)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/7)
#  426|   			{
#  427|   				assert(nkeys_vd < brz->size[cur_bucket]);
#  428|-> 				keys_vd[nkeys_vd++] = buffer_merge[i];
#  429|   				buffer_merge[i] = NULL; //transfer memory ownership
#  430|   				e++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def526]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:438:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘keys_vd’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:225:12: enter_function: entry to ‘brz_gen_mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:60: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:367:11: branch_false: following ‘false’ branch (when ‘nflushes <= 1024’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:369:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:391:20: branch_false: following ‘false’ branch (when ‘i >= nflushes’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:405:34: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:405:34: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:408:15: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: call_function: calling ‘brz_min_index’ from ‘brz_gen_mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: return_function: returning to ‘brz_gen_mphf’ from ‘brz_min_index’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:435:19: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:437:25: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:437:25: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:438:59: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:438:25: danger: ‘keys_vd + (long unsigned int)nkeys_vd * 8’ could be NULL: unchecked value from [(10)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/9)
#  436|   		{
#  437|   			assert(nkeys_vd < brz->size[cur_bucket]);
#  438|-> 			keys_vd[nkeys_vd++] = buffer_merge[i];
#  439|   			buffer_merge[i] = NULL; //transfer memory ownership
#  440|   			e++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def527]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:438:47: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buffer_merge’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:225:12: enter_function: entry to ‘brz_gen_mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:251:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:253:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:307:60: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:367:11: branch_false: following ‘false’ branch (when ‘nflushes <= 1024’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:369:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:387:39: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:391:20: branch_false: following ‘false’ branch (when ‘i >= nflushes’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:405:34: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:408:15: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: call_function: calling ‘brz_min_index’ from ‘brz_gen_mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:410:21: return_function: returning to ‘brz_gen_mphf’ from ‘brz_min_index’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:435:19: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:437:25: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:437:25: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:438:59: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:438:47: danger: ‘buffer_merge + (long unsigned int)brz_min_index(buffer_h0,  nflushes) * 8’ could be NULL: unchecked value from [(8)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/7)
#  436|   		{
#  437|   			assert(nkeys_vd < brz->size[cur_bucket]);
#  438|-> 			keys_vd[nkeys_vd++] = buffer_merge[i];
#  439|   			buffer_merge[i] = NULL; //transfer memory ownership
#  440|   			e++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def528]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:539:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:538:23: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:539:9: danger: ‘buf’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
#  537|   	*buflen = buflenh1 + buflenh2 + n + 2U * (cmph_uint32)sizeof(cmph_uint32);
#  538|   	buf = (char *)malloc((size_t)(*buflen));
#  539|-> 	memcpy(buf, &buflenh1, sizeof(cmph_uint32));
#  540|   	memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
#  541|   	memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def529]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:560:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:559:23: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:560:9: danger: ‘buf’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
#  558|   	*buflen = buflenh1 + buflenh2 + n + 2U * (cmph_uint32)sizeof(cmph_uint32);
#  559|   	buf = (char *)malloc((size_t)(*buflen));
#  560|-> 	memcpy(buf, &buflenh1, sizeof(cmph_uint32));
#  561|   	memcpy(buf+sizeof(cmph_uint32), bufh1, (size_t)buflenh1);
#  562|   	memcpy(buf+sizeof(cmph_uint32)+buflenh1, &buflenh2, sizeof(cmph_uint32));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def530]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:608:64: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘brz’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:601:41: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:608:64: danger: ‘brz’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
#  606|   	nbytes = fread(&(brz->algo), sizeof(brz->algo), (size_t)1, f); // Reading algo.
#  607|   	nbytes = fread(&(brz->k), sizeof(cmph_uint32), (size_t)1, f);
#  608|-> 	brz->size   = (cmph_uint8 *) malloc(sizeof(cmph_uint8)*brz->k);
#  609|   	nbytes = fread(brz->size, sizeof(cmph_uint8)*(brz->k), (size_t)1, f);	
#  610|   	brz->h1 = (hash_state_t **)malloc(sizeof(hash_state_t *)*brz->k);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def531]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:620:31: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:615:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:618:26: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:620:31: danger: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
#  618|   		nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
#  619|   		DEBUGP("Hash state 1 has %u bytes\n", buflen);
#  620|-> 		buf = (char *)malloc((size_t)buflen);
#  621|   		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  622|   		brz->h1[i] = hash_state_load(buf, buflen);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def532]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:627:31: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:615:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:618:26: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:627:31: danger: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
#  625|   		nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
#  626|   		DEBUGP("Hash state 2 has %u bytes\n", buflen);
#  627|-> 		buf = (char *)malloc((size_t)buflen);
#  628|   		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  629|   		brz->h2[i] = hash_state_load(buf, buflen);

Error: GCC_ANALYZER_WARNING: [#def533]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:642:43: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:615:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:618:26: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:642:43: danger: at least one operand of the size argument is of a floating-point type
#  640|   		}
#  641|   		DEBUGP("g_i has %u bytes\n", n);
#  642|-> 		brz->g[i] = (cmph_uint8 *)calloc((size_t)n, sizeof(cmph_uint8));
#  643|   		nbytes = fread(brz->g[i], sizeof(cmph_uint8)*n, (size_t)1, f);
#  644|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def534]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:643:32: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)n, 1)’
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:615:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:618:26: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:642:43: acquire_memory: allocated here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:643:32: danger: ‘calloc((long unsigned int)n, 1)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4)
#  641|   		DEBUGP("g_i has %u bytes\n", n);
#  642|   		brz->g[i] = (cmph_uint8 *)calloc((size_t)n, sizeof(cmph_uint8));
#  643|-> 		nbytes = fread(brz->g[i], sizeof(cmph_uint8)*n, (size_t)1, f);
#  644|   	}
#  645|   	//loading h0

Error: GCC_ANALYZER_WARNING (CWE-789): [#def535]
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:648:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:615:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:646:18: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/brz.c:648:23: danger: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
#  646|   	nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
#  647|   	DEBUGP("Hash state has %u bytes\n", buflen);
#  648|-> 	buf = (char *)malloc((size_t)buflen);
#  649|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  650|   	brz->h0 = hash_state_load(buf, buflen);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def536]
glib-2.84.1/redhat-linux-build/../girepository/cmph/buffer_entry.c:78:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/buffer_entry.c:77:29: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/buffer_entry.c:78:9: danger: ‘buf’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   76|   	copied_bytes = 0;
#   77|   	buf = (cmph_uint8 *)malloc(*keylen + sizeof(*keylen));
#   78|->         memcpy(buf, keylen, sizeof(*keylen));
#   79|   	if((buffer_entry->pos + lacked_bytes) > buffer_entry->nbytes) {
#   80|   		copied_bytes = buffer_entry->nbytes - buffer_entry->pos;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def537]
glib-2.84.1/redhat-linux-build/../girepository/cmph/buffer_manager.c:28:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc((long unsigned int)nentries, 8)’
glib-2.84.1/redhat-linux-build/../girepository/cmph/buffer_manager.c:19:9: branch_true: following ‘true’ branch (when ‘buff_manager’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/buffer_manager.c:20:9: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/buffer_manager.c:21:59: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/buffer_manager.c:26:20: branch_true: following ‘true’ branch (when ‘i < nentries’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/buffer_manager.c:28:45: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/buffer_manager.c:28:17: danger: ‘calloc((long unsigned int)nentries, 8) + (long unsigned int)i * 8’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   26|   	for(i = 0; i < buff_manager->nentries; i++)
#   27|   	{
#   28|-> 		buff_manager->buffer_entries[i] = buffer_entry_new(memory_avail_entry);
#   29|   	}	
#   30|   	return buff_manager;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def538]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:133:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘vals_table’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:99:11: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:104:31: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:126:37: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:129:29: branch_true: following ‘true’ branch (when ‘i < nbins’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:131:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:131:19: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:133:36: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:133:25: danger: ‘vals_table + (long unsigned int)idx * 4’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  131|   		if(!GETBIT32(occup_table, i))
#  132|   		{
#  133|-> 			vals_table[idx++] = i;
#  134|   		}
#  135|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def539]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:146:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:99:11: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:104:31: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:145:26: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:146:9: danger: ‘mphf’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  144|   
#  145|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  146|-> 	mphf->algo = mph->algo;
#  147|   	chdf = (chd_data_t *)malloc(sizeof(chd_data_t));
#  148|   	

Error: GCC_ANALYZER_WARNING (CWE-476): [#def540]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:149:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘chdf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:99:11: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:104:31: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:147:30: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:149:9: danger: ‘chdf’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  147|   	chdf = (chd_data_t *)malloc(sizeof(chd_data_t));
#  148|   	
#  149|-> 	chdf->packed_cr = packed_cr;
#  150|   	packed_cr = NULL; //transfer memory ownership
#  151|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def541]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:186:61: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘chd’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:179:41: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:186:61: danger: ‘chd’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  184|   	nbytes = fread(&chd->packed_chd_phf_size, sizeof(cmph_uint32), (size_t)1, fd);
#  185|   	DEBUGP("Loading CHD_PH perfect hash function with %u bytes to disk\n", chd->packed_chd_phf_size);
#  186|-> 	chd->packed_chd_phf = (cmph_uint8 *) calloc((size_t)chd->packed_chd_phf_size,(size_t)1);
#  187|   	nbytes = fread(chd->packed_chd_phf, chd->packed_chd_phf_size, (size_t)1, fd);
#  188|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def542]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:189:18: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:186:46: acquire_memory: allocated here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd.c:189:18: danger: ‘<unknown>’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  187|   	nbytes = fread(chd->packed_chd_phf, chd->packed_chd_phf_size, (size_t)1, fd);
#  188|   
#  189|-> 	nbytes = fread(&chd->packed_cr_size, sizeof(cmph_uint32), (size_t)1, fd);
#  190|   	DEBUGP("Loading Compressed rank structure, which has %u bytes\n", chd->packed_cr_size);
#  191|   	chd->packed_cr = (cmph_uint8 *) calloc((size_t)chd->packed_cr_size, (size_t)1);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def543]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:87:55: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘tmp_map_item’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:627:9: enter_function: entry to ‘chd_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:698:11: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:699:63: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:715:21: call_function: calling ‘chd_ph_mapping’ from ‘chd_ph_new’
#   85|   	register chd_ph_item_t * tmp_item;
#   86|   	register chd_ph_map_item_t * tmp_map_item = map_items + item_idx;
#   87|-> 	register chd_ph_bucket_t * bucket = buckets + tmp_map_item->bucket_num;
#   88|   	tmp_item = items + bucket->items_list;
#   89|   	

Error: GCC_ANALYZER_WARNING (CWE-457): [#def544]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:87:55: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*tmp_map_item.bucket_num’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:627:9: enter_function: entry to ‘chd_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:698:11: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:699:63: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:715:21: call_function: calling ‘chd_ph_mapping’ from ‘chd_ph_new’
#   85|   	register chd_ph_item_t * tmp_item;
#   86|   	register chd_ph_map_item_t * tmp_map_item = map_items + item_idx;
#   87|-> 	register chd_ph_bucket_t * bucket = buckets + tmp_map_item->bucket_num;
#   88|   	tmp_item = items + bucket->items_list;
#   89|   	

Error: GCC_ANALYZER_WARNING (CWE-476): [#def545]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:248:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘map_item’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:627:9: enter_function: entry to ‘chd_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:698:11: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:699:63: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:715:21: call_function: calling ‘chd_ph_mapping’ from ‘chd_ph_new’
#  246|   
#  247|   			g = hl[0] % chd_ph->nbuckets;
#  248|-> 			map_item->f = hl[1] % chd_ph->n;
#  249|   			map_item->h = hl[2] % (chd_ph->n - 1) + 1;
#  250|   			map_item->bucket_num=g;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def546]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:314:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘sorted_lists’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:627:9: enter_function: entry to ‘chd_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:698:11: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:699:63: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:715:21: call_function: calling ‘chd_ph_mapping’ from ‘chd_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:715:21: return_function: returning to ‘chd_ph_new’ from ‘chd_ph_mapping’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:715:19: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:725:21: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:729:19: branch_false: following ‘false’ branch (when ‘sorted_lists’ is NULL)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:734:32: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:734:32: call_function: calling ‘chd_ph_ordering’ from ‘chd_ph_new’
#  312|   		sorted_lists[bucket_size].size++;
#  313|   	};
#  314|-> 	sorted_lists[1].buckets_list = 0;
#  315|   	// Determine final position of list of buckets into the contiguous array that will store all the buckets
#  316|   	for(i = 2; i <= max_bucket_size; i++)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def547]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:808:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:627:9: enter_function: entry to ‘chd_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:698:11: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:699:63: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:715:21: call_function: calling ‘chd_ph_mapping’ from ‘chd_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:715:21: return_function: returning to ‘chd_ph_new’ from ‘chd_ph_mapping’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:715:19: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:725:21: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:729:19: branch_false: following ‘false’ branch (when ‘sorted_lists’ is NULL)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:734:32: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:741:37: call_function: calling ‘chd_ph_searching’ from ‘chd_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:741:37: return_function: returning to ‘chd_ph_new’ from ‘chd_ph_searching’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:742:19: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:773:13: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:797:11: branch_false: following ‘false’ branch (when ‘failure == 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:807:26: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:807:26: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:808:9: danger: ‘mphf’ could be NULL: unchecked value from [(32)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/31)
#  806|   
#  807|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  808|-> 	mphf->algo = mph->algo;
#  809|   	chd_phf = (chd_ph_data_t *)malloc(sizeof(chd_ph_data_t));
#  810|   	

Error: GCC_ANALYZER_WARNING (CWE-476): [#def548]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:811:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘chd_phf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:627:9: enter_function: entry to ‘chd_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:698:11: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:699:63: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:715:21: call_function: calling ‘chd_ph_mapping’ from ‘chd_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:715:21: return_function: returning to ‘chd_ph_new’ from ‘chd_ph_mapping’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:715:19: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:725:21: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:729:19: branch_false: following ‘false’ branch (when ‘sorted_lists’ is NULL)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:734:32: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:741:37: call_function: calling ‘chd_ph_searching’ from ‘chd_ph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:741:37: return_function: returning to ‘chd_ph_new’ from ‘chd_ph_searching’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:742:19: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:773:13: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:797:11: branch_false: following ‘false’ branch (when ‘failure == 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:807:26: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:809:36: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:811:9: danger: ‘chd_phf’ could be NULL: unchecked value from [(32)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/31)
#  809|   	chd_phf = (chd_ph_data_t *)malloc(sizeof(chd_ph_data_t));
#  810|   	
#  811|-> 	chd_phf->cs = chd_ph->cs;
#  812|   	chd_ph->cs = NULL; //transfer memory ownership
#  813|   	chd_phf->hl = chd_ph->hl;

Error: GCC_ANALYZER_WARNING (CWE-789): [#def549]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:850:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
#  848|   	nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
#  849|   	DEBUGP("Hash state has %u bytes\n", buflen);
#  850|-> 	buf = (char *)malloc((size_t)buflen);
#  851|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, fd);
#  852|   	chd_ph->hl = hash_state_load(buf, buflen);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def550]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chd_ph.c:857:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
#  855|   	nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, fd);
#  856|   	DEBUGP("Compressed sequence structure has %u bytes\n", buflen);
#  857|-> 	buf = (char *)malloc((size_t)buflen);
#  858|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, fd);
#  859|   	chd_ph->cs = (compressed_seq_t *) calloc(1, sizeof(compressed_seq_t)); 

Error: GCC_ANALYZER_WARNING (CWE-476): [#def551]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:71:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*chm.hashes + (long unsigned int)i * 8’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:70:40: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:71:20: branch_true: following ‘true’ branch (when ‘i != 3’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:71:32: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:71:32: danger: ‘*chm.hashes + (long unsigned int)i * 8’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   69|   
#   70|   	chm->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*3);
#   71|-> 	for(i = 0; i < 3; ++i) chm->hashes[i] = NULL;
#   72|   	//Mapping step
#   73|   	if (mph->verbosity)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def552]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:118:22: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘visited’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:71:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:71:20: branch_false: following ‘false’ branch (when ‘i == 3’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:73:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:99:12: branch_false: following ‘false’ branch (when ‘iterations != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:106:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:111:33: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:115:9: branch_true: following ‘true’ branch...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:116:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:118:22: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:118:22: danger: ‘visited + (sizetype)(i >> 3)’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  116|   	for (i = 0; i < chm->n; ++i)
#  117|   	{
#  118|-> 	        if (!GETBIT(visited,i))
#  119|   		{
#  120|   			chm->g[i] = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def553]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:129:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:71:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:71:20: branch_false: following ‘false’ branch (when ‘i == 3’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:73:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:99:12: branch_false: following ‘false’ branch (when ‘iterations != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:106:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:115:9: branch_true: following ‘true’ branch...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:128:26: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:129:9: danger: ‘mphf’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  127|   
#  128|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  129|-> 	mphf->algo = mph->algo;
#  130|   	chmf = (chm_data_t *)malloc(sizeof(chm_data_t));
#  131|   	chmf->g = chm->g;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def554]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:131:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘chmf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:71:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:71:20: branch_false: following ‘false’ branch (when ‘i == 3’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:73:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:99:12: branch_false: following ‘false’ branch (when ‘iterations != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:106:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:115:9: branch_true: following ‘true’ branch...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:130:30: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:131:9: danger: ‘chmf’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  129|   	mphf->algo = mph->algo;
#  130|   	chmf = (chm_data_t *)malloc(sizeof(chm_data_t));
#  131|-> 	chmf->g = chm->g;
#  132|   	chm->g = NULL; //transfer memory ownership
#  133|   	chmf->hashes = chm->hashes;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def555]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:252:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘chm’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:247:41: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:252:9: danger: ‘chm’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  250|   	mphf->data = chm;
#  251|   	nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f);
#  252|-> 	chm->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1));
#  253|   	chm->hashes[nhashes] = NULL;
#  254|   	DEBUGP("Reading %u hashes\n", nhashes);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def556]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:252:40: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘(long unsigned int)(nhashes + 1) * 8’ as allocation size without upper-bounds checking
#  250|   	mphf->data = chm;
#  251|   	nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f);
#  252|-> 	chm->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1));
#  253|   	chm->hashes[nhashes] = NULL;
#  254|   	DEBUGP("Reading %u hashes\n", nhashes);

Error: GCC_ANALYZER_WARNING (CWE-823): [#def557]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:253:9: warning[-Wanalyzer-tainted-offset]: use of attacker-controlled value ‘(long unsigned int)nhashes * 8’ as offset without upper-bounds checking
#  251|   	nbytes = fread(&nhashes, sizeof(cmph_uint32), (size_t)1, f);
#  252|   	chm->hashes = (hash_state_t **)malloc(sizeof(hash_state_t *)*(nhashes + 1));
#  253|-> 	chm->hashes[nhashes] = NULL;
#  254|   	DEBUGP("Reading %u hashes\n", nhashes);
#  255|   	for (i = 0; i < nhashes; ++i)

Error: GCC_ANALYZER_WARNING (CWE-789): [#def558]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:260:31: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:255:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:258:26: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:260:31: danger: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
#  258|   		nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
#  259|   		DEBUGP("Hash state has %u bytes\n", buflen);
#  260|-> 		buf = (char *)malloc((size_t)buflen);
#  261|   		nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  262|   		state = hash_state_load(buf, buflen);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def559]
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:268:18: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:252:40: acquire_memory: allocated here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:255:21: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:268:24: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/chm.c:268:18: danger: ‘<unknown>’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  266|   
#  267|   	DEBUGP("Reading m and n\n");
#  268|-> 	nbytes = fread(&(chm->n), sizeof(cmph_uint32), (size_t)1, f);	
#  269|   	nbytes = fread(&(chm->m), sizeof(cmph_uint32), (size_t)1, f);	
#  270|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def560]
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph.c:116:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*key’ where non-null expected
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph.c:115:24: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph.c:116:9: danger: argument 1 (‘malloc((strlen(*<unknown>) & 4294967295) + 1)’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#argument 1 of ‘__builtin_strcpy’ must be non-null
#  114|   	size = *keylen;
#  115|           *key = (char *)malloc(size + 1);
#  116|->         strcpy(*key, keys_vd[cmph_vector->position]);
#  117|           cmph_vector->position = cmph_vector->position + 1;
#  118|   	return (int)(*keylen);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def561]
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph_structs.c:12:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘mph’ where non-null expected
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph_structs.c:11:47: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph_structs.c:12:9: danger: argument 1 (‘mph’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#argument 1 of ‘__builtin_memset’ must be non-null
#   10|   {
#   11|   	cmph_config_t *mph = (cmph_config_t *)malloc(sizeof(cmph_config_t));
#   12|-> 	memset(mph, 0, sizeof(cmph_config_t));
#   13|   	if (mph == NULL) return NULL;
#   14|   	mph->key_source = key_source;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def562]
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph_structs.c:65:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph_structs.c:48:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph_structs.c:49:21: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph_structs.c:52:20: branch_true: following ‘true’ branch (when ‘i != 9’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph_structs.c:54:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph_structs.c:59:12: branch_false: following ‘false’ branch (when ‘algo != 9’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph_structs.c:64:26: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph_structs.c:64:26: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/cmph_structs.c:65:9: danger: ‘mphf’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#   63|   	}
#   64|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#   65|-> 	mphf->algo = algo;
#   66|   	nbytes = fread(&(mphf->size), sizeof(mphf->size), (size_t)1, f);
#   67|   	mphf->data = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def563]
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:64:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘select_vec’
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:49:38: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:53:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:58:27: branch_true: following ‘true’ branch...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_rank.c:64:17: danger: ‘select_vec + (long unsigned int)(i + 4294967295) * 4’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#   62|   			j++;
#   63|   		}
#   64|-> 		select_vec[i - 1] = j;
#   65|   	};
#   66|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def564]
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:60:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘lengths’
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:49:57: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:56:20: branch_true: following ‘true’ branch (when ‘i < n’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:58:30: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:58:19: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:60:32: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:60:25: danger: ‘lengths + (long unsigned int)i * 4’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#   58|   		if(vals_table[i] == 0)
#   59|   		{
#   60|-> 			lengths[i] = 0;
#   61|   		}
#   62|   		else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def565]
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:64:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘lengths’
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:49:57: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:56:20: branch_true: following ‘true’ branch (when ‘i < n’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:58:30: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:58:19: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:64:38: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/compressed_seq.c:64:25: danger: ‘lengths + (long unsigned int)i * 4’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#   62|   		else
#   63|   		{
#   64|-> 			lengths[i] = compressed_seq_i_log2(vals_table[i] + 1);
#   65|   			cs->total_length += lengths[i];
#   66|   		};

Error: GCC_ANALYZER_WARNING (CWE-476): [#def566]
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:177:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘random_table’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:163:54: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:175:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:177:29: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:177:17: danger: ‘random_table + (long unsigned int)i * 4’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  175|   	for(i = 0; i < fch->m; i++)
#  176|   	{
#  177|-> 		random_table[i] = i;
#  178|   	}
#  179|   	permut(random_table, fch->m);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def567]
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:182:27: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘random_table’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:161:19: enter_function: entry to ‘searching’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:163:54: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:175:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:179:9: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:179:9: call_function: calling ‘permut’ from ‘searching’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:179:9: return_function: returning to ‘searching’ from ‘permut’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:180:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:182:39: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:182:27: danger: ‘random_table + (long unsigned int)i * 4’ could be NULL: unchecked value from [(2)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/1)
#  180|   	for(i = 0; i < fch->m; i++)
#  181|   	{
#  182|-> 		map_table[random_table[i]] = i;
#  183|   	}
#  184|   	do {   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def568]
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:212:71: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘random_table’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:161:19: enter_function: entry to ‘searching’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:163:54: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:175:20: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:179:9: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:179:9: call_function: calling ‘permut’ from ‘searching’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:179:9: return_function: returning to ‘searching’ from ‘permut’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:180:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:189:20: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:191:25: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:198:28: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:199:94: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:200:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:206:36: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:212:71: danger: ‘random_table + (long unsigned int)(z + filled_count) * 4’ could be NULL: unchecked value from [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
#  210|   				counter = 0; 
#  211|   				restart = 0; // false
#  212|-> 				fch->g[sorted_indexes[i]] = (fch->m + random_table[filled_count + z] - h2) % fch->m;
#  213|   				//DEBUGP("g[%u]: %u\n", sorted_indexes[i], fch->g[sorted_indexes[i]]);
#  214|   				j = INDEX;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def569]
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:294:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘mphf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:251:9: enter_function: entry to ‘fch_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:274:20: branch_false: following ‘false’ branch (when ‘buckets’ is NULL)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:275:27: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:280:20: branch_false: following ‘false’ branch (when ‘sorted_indexes’ is NULL)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:281:34: call_function: inlined call to ‘ordering’ from ‘fch_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:286:35: call_function: calling ‘searching’ from ‘fch_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:286:35: return_function: returning to ‘fch_new’ from ‘searching’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:289:17: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:290:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:290:12: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:291:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:292:12: branch_false: following ‘false’ branch (when ‘iterations != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:293:26: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:293:26: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:294:9: danger: ‘mphf’ could be NULL: unchecked value from [(27)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/26)
#  292|   	if (iterations == 0) return NULL;
#  293|   	mphf = (cmph_t *)malloc(sizeof(cmph_t));
#  294|-> 	mphf->algo = mph->algo;
#  295|   	fchf = (fch_data_t *)malloc(sizeof(fch_data_t));
#  296|   	fchf->g = fch->g;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def570]
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:296:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fchf’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:251:9: enter_function: entry to ‘fch_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:274:20: branch_false: following ‘false’ branch (when ‘buckets’ is NULL)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:275:27: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:280:20: branch_false: following ‘false’ branch (when ‘sorted_indexes’ is NULL)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:281:34: call_function: inlined call to ‘ordering’ from ‘fch_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:286:35: call_function: calling ‘searching’ from ‘fch_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:286:35: return_function: returning to ‘fch_new’ from ‘searching’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:289:17: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:290:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:290:12: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:291:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:292:12: branch_false: following ‘false’ branch (when ‘iterations != 0’)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:293:26: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:295:30: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:296:9: danger: ‘fchf’ could be NULL: unchecked value from [(27)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/26)
#  294|   	mphf->algo = mph->algo;
#  295|   	fchf = (fch_data_t *)malloc(sizeof(fch_data_t));
#  296|-> 	fchf->g = fch->g;
#  297|   	fch->g = NULL; //transfer memory ownership
#  298|   	fchf->h1 = fch->h1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def571]
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:373:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘fch’
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:365:41: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:373:9: danger: ‘fch’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  371|   	mphf->data = fch;
#  372|   	//DEBUGP("Reading h1\n");
#  373|-> 	fch->h1 = NULL;
#  374|   	nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
#  375|   	//DEBUGP("Hash state of h1 has %u bytes\n", buflen);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def572]
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:376:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
#  374|   	nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
#  375|   	//DEBUGP("Hash state of h1 has %u bytes\n", buflen);
#  376|-> 	buf = (char *)malloc((size_t)buflen);
#  377|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  378|   	fch->h1 = hash_state_load(buf, buflen);

Error: GCC_ANALYZER_WARNING (CWE-789): [#def573]
glib-2.84.1/redhat-linux-build/../girepository/cmph/fch.c:387:23: warning[-Wanalyzer-tainted-allocation-size]: use of attacker-controlled value ‘buflen’ as allocation size without upper-bounds checking
#  385|   	nbytes = fread(&buflen, sizeof(cmph_uint32), (size_t)1, f);
#  386|   	//DEBUGP("Hash state of h2 has %u bytes\n", buflen);
#  387|-> 	buf = (char *)malloc((size_t)buflen);
#  388|   	nbytes = fread(buf, (size_t)buflen, (size_t)1, f);
#  389|   	fch->h2 = hash_state_load(buf, buflen);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def574]
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:165:41: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*g.first + (long unsigned int)i * 4’
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:36:10: enter_function: entry to ‘graph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:39:12: branch_false: following ‘false’ branch (when ‘graph’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:41:39: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:43:39: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:49:9: call_function: calling ‘graph_clear_edges’ from ‘graph_new’
#  163|   {
#  164|   	cmph_uint32 i;
#  165|-> 	for (i = 0; i < g->nnodes; ++i) g->first[i] = EMPTY;
#  166|   	for (i = 0; i < g->nedges*2; ++i) 
#  167|   	{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def575]
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:168:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*g.edges + (long unsigned int)i * 4’
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:36:10: enter_function: entry to ‘graph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:39:12: branch_false: following ‘false’ branch (when ‘graph’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:41:39: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:41:39: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:49:9: call_function: calling ‘graph_clear_edges’ from ‘graph_new’
#  166|   	for (i = 0; i < g->nedges*2; ++i) 
#  167|   	{
#  168|-> 		g->edges[i] = EMPTY;
#  169|   		g->next[i] = EMPTY;
#  170|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def576]
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:169:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*g.next + (long unsigned int)i * 4’
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:36:10: enter_function: entry to ‘graph_new’
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:39:12: branch_false: following ‘false’ branch (when ‘graph’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:41:39: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:42:39: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:49:9: call_function: calling ‘graph_clear_edges’ from ‘graph_new’
#  167|   	{
#  168|   		g->edges[i] = EMPTY;
#  169|-> 		g->next[i] = EMPTY;
#  170|   	}
#  171|   	g->cedges = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def577]
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:243:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘deleted’
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:232:45: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:241:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:243:23: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:243:23: danger: ‘deleted + (sizetype)(i >> 3)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  241|   	for (i = 0; i < g->nedges; ++i)
#  242|   	{
#  243|-> 		if (!(GETBIT(deleted, i))) 
#  244|   		{
#  245|   			DEBUGP("Edge %u %u->%u was not deleted\n", i, g->edges[i], g->edges[i + g->nedges]);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def578]
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:278:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘deleted’
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:263:45: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:276:21: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:278:23: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/graph.c:278:23: danger: ‘deleted + (sizetype)(i >> 3)’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  276|   	for (i = 0; i < g->nedges; ++i)
#  277|   	{
#  278|-> 		if (!(GETBIT(deleted,i))) 
#  279|   		{
#  280|   			DEBUGP("Edge %u %u->%u belongs to the 2-core\n", i, g->edges[i], g->edges[i + g->nedges]);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def579]
glib-2.84.1/redhat-linux-build/../girepository/cmph/jenkins_hash.c:91:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘state’
glib-2.84.1/redhat-linux-build/../girepository/cmph/jenkins_hash.c:89:53: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/jenkins_hash.c:91:9: danger: ‘state’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   89|   	jenkins_state_t *state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t));
#   90|   	DEBUGP("Initializing jenkins hash\n");
#   91|-> 	state->seed = ((cmph_uint32)rand() % size);
#   92|   	return state;
#   93|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def580]
glib-2.84.1/redhat-linux-build/../girepository/cmph/jenkins_hash.c:237:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘dest_state’
glib-2.84.1/redhat-linux-build/../girepository/cmph/jenkins_hash.c:236:58: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/jenkins_hash.c:237:9: danger: ‘dest_state’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  235|   {
#  236|   	jenkins_state_t *dest_state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t));
#  237|-> 	dest_state->hashfunc = src_state->hashfunc;
#  238|   	dest_state->seed = src_state->seed;
#  239|   	return dest_state;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def581]
glib-2.84.1/redhat-linux-build/../girepository/cmph/jenkins_hash.c:245:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘state’
glib-2.84.1/redhat-linux-build/../girepository/cmph/jenkins_hash.c:244:53: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/jenkins_hash.c:245:9: danger: ‘state’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  243|   {
#  244|   	jenkins_state_t *state = (jenkins_state_t *)malloc(sizeof(jenkins_state_t));
#  245|-> 	state->seed = *(cmph_uint32 *)buf;
#  246|   	state->hashfunc = CMPH_HASH_JENKINS;
#  247|   	DEBUGP("Loaded jenkins state with seed %u\n", state->seed);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def582]
glib-2.84.1/redhat-linux-build/../girepository/cmph/select.c:84:55: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bits_table’
glib-2.84.1/redhat-linux-build/../girepository/cmph/select.c:94:6: enter_function: entry to ‘select_generate’
glib-2.84.1/redhat-linux-build/../girepository/cmph/select.c:114:40: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/select.c:158:11: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/select.c:164:9: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/select.c:164:9: call_function: calling ‘select_generate_sel_table’ from ‘select_generate’
#   82|   		{
#   83|   			old_part_sum = part_sum; 
#   84|-> 			part_sum += rank_lookup_table[bits_table[vec_idx]];
#   85|   			vec_idx++;
#   86|   		} while (part_sum <= one_idx);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def583]
glib-2.84.1/redhat-linux-build/../girepository/cmph/select.c:88:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*sel.select_table’
glib-2.84.1/redhat-linux-build/../girepository/cmph/select.c:94:6: enter_function: entry to ‘select_generate’
glib-2.84.1/redhat-linux-build/../girepository/cmph/select.c:120:44: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../girepository/cmph/select.c:158:11: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/cmph/select.c:164:9: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/cmph/select.c:164:9: call_function: calling ‘select_generate_sel_table’ from ‘select_generate’
#   86|   		} while (part_sum <= one_idx);
#   87|   		
#   88|-> 		sel->select_table[sel_table_idx] = select_lookup_table[bits_table[vec_idx - 1]][one_idx - old_part_sum] + ((vec_idx - 1) << 3); // ((vec_idx - 1) << 3) = ((vec_idx - 1) * 8)
#   89|   		one_idx += STEP_SELECT_TABLE ;
#   90|   		sel_table_idx++;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def584]
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:131:10: warning[-Wanalyzer-file-leak]: leak of FILE ‘file’
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:65:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:78:10: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:89:14: acquire_resource: opened here
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:91:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:100:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:101:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:103:102: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:131:10: danger: ‘file’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  129|     g_free (tmp_filename);
#  130|   
#  131|->   return success;
#  132|   }
#  133|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def585]
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:131:10: warning[-Wanalyzer-malloc-leak]: leak of ‘file’
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:65:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:78:10: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:89:14: acquire_memory: allocated here
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:91:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:100:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:101:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:103:102: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/compiler/compiler.c:131:10: danger: ‘file’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  129|     g_free (tmp_filename);
#  130|   
#  131|->   return success;
#  132|   }
#  133|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def586]
glib-2.84.1/redhat-linux-build/../girepository/gibaseinfo.c:506:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../girepository/gibaseinfo.c:480:1: enter_function: entry to ‘gi_info_from_entry’
glib-2.84.1/redhat-linux-build/../girepository/gibaseinfo.c:487:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../girepository/gibaseinfo.c:492:31: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../girepository/gibaseinfo.c:496:10: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../girepository/gibaseinfo.c:500:45: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../girepository/gibaseinfo.c:500:45: call_function: calling ‘gi_info_new_full’ from ‘gi_info_from_entry’
glib-2.84.1/redhat-linux-build/../girepository/gibaseinfo.c:500:45: return_function: returning to ‘gi_info_from_entry’ from ‘gi_info_new_full’
glib-2.84.1/redhat-linux-build/../girepository/gibaseinfo.c:506:11: danger: dereference of NULL ‘gi_info_new_full(19, repository, 0,  typelib, *<unknown>.offset)’
#  504|                                                                 entry->offset);
#  505|   
#  506|->           unresolved->name = name;
#  507|             unresolved->namespace = namespace;
#  508|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def587]
glib-2.84.1/redhat-linux-build/../glib/deprecated/gcompletion.c:254:9: warning[-Wanalyzer-null-argument]: use of NULL ‘*cmp.prefix’ where non-null expected
glib-2.84.1/redhat-linux-build/../glib/deprecated/gcompletion.c:351:1: enter_function: entry to ‘g_completion_complete’
glib-2.84.1/redhat-linux-build/../glib/deprecated/gcompletion.c:359:3: branch_true: following ‘true’ branch (when ‘cmp’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../glib/deprecated/gcompletion.c:360:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/deprecated/gcompletion.c:360:3: branch_true: following ‘true’ branch (when ‘prefix’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../glib/deprecated/gcompletion.c:362:9: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/deprecated/gcompletion.c:400:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/deprecated/gcompletion.c:402:7: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/deprecated/gcompletion.c:403:7: release_memory: ‘*cmp.prefix’ is NULL
glib-2.84.1/redhat-linux-build/../glib/deprecated/gcompletion.c:405:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/deprecated/gcompletion.c:407:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/deprecated/gcompletion.c:407:3: call_function: calling ‘completion_check_cache’ from ‘g_completion_complete’
#argument 1 of ‘__builtin_strlen’ must be non-null
#  252|       }
#  253|     
#  254|->   len = strlen(cmp->prefix);
#  255|     list = cmp->cache;
#  256|     s = cmp->func ? cmp->func (list->data) : (gchar*) list->data;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def588]
glib-2.84.1/redhat-linux-build/../glib/garray.c:192:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../glib/garray.c:178:1: enter_function: entry to ‘g_array_new_take’
glib-2.84.1/redhat-linux-build/../glib/garray.c:186:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/garray.c:187:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/garray.c:187:3: branch_true: following ‘true’ branch (when ‘len <= 4294967295’)...
glib-2.84.1/redhat-linux-build/../glib/garray.c:188:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/garray.c:188:3: branch_true: following ‘true’ branch (when ‘element_size <= 4294967295’)...
glib-2.84.1/redhat-linux-build/../glib/garray.c:190:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/garray.c:190:11: call_function: calling ‘g_array_sized_new’ from ‘g_array_new_take’
glib-2.84.1/redhat-linux-build/../glib/garray.c:190:11: return_function: returning to ‘g_array_new_take’ from ‘g_array_sized_new’
glib-2.84.1/redhat-linux-build/../glib/garray.c:192:3: danger: dereference of NULL ‘g_array_sized_new(0, clear, (unsigned int)element_size, 0)’
#  190|     array = g_array_sized_new (FALSE, clear, element_size, 0);
#  191|     rarray = (GRealArray *) array;
#  192|->   rarray->data = (guint8 *) g_steal_pointer (&data);
#  193|     rarray->len = len;
#  194|     rarray->elt_capacity = len;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def589]
glib-2.84.1/redhat-linux-build/../glib/garray.c:1591:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../glib/garray.c:1581:1: enter_function: entry to ‘g_array_copy’
glib-2.84.1/redhat-linux-build/../glib/garray.c:1586:3: branch_true: following ‘true’ branch (when ‘array’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../glib/garray.c:1589:20: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/garray.c:1589:20: call_function: calling ‘g_array_sized_new’ from ‘g_array_copy’
glib-2.84.1/redhat-linux-build/../glib/garray.c:1589:20: return_function: returning to ‘g_array_copy’ from ‘g_array_sized_new’
glib-2.84.1/redhat-linux-build/../glib/garray.c:1591:3: danger: dereference of NULL ‘g_array_sized_new((int)*(GRealArray *)array.zero_terminated, (int)*(GRealArray *)array.clear, *(GRealArray *)array.elt_size, *(GRealArray *)array.elt_capacity)’
# 1589|       (GRealArray *) g_array_sized_new (rarray->zero_terminated, rarray->clear,
# 1590|                                         rarray->elt_size, rarray->elt_capacity);
# 1591|->   new_rarray->len = rarray->len;
# 1592|     if (rarray->len > 0)
# 1593|       memcpy (new_rarray->data, rarray->data, rarray->len * rarray->elt_size);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def590]
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:371:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘new_fd’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:375:1: enter_function: entry to ‘stack_trace’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:393:8: call_function: calling ‘g_unix_open_pipe_internal’ from ‘stack_trace’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:393:8: return_function: returning to ‘stack_trace’ from ‘g_unix_open_pipe_internal’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:393:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:394:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:394:8: call_function: calling ‘g_unix_open_pipe_internal’ from ‘stack_trace’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:394:8: return_function: returning to ‘stack_trace’ from ‘g_unix_open_pipe_internal’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:393:7: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:400:9: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:401:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:404:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:405:10: branch_false: following ‘false’ branch (when ‘old_err == -1’)...
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:412:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:413:7: call_function: calling ‘checked_dup’ from ‘stack_trace’
#  369|       }
#  370|   
#  371|->   return new_fd;
#  372|   }
#  373|   

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def591]
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:424:11: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘2’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:375:1: enter_function: entry to ‘stack_trace’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:393:8: call_function: calling ‘g_unix_open_pipe_internal’ from ‘stack_trace’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:393:8: return_function: returning to ‘stack_trace’ from ‘g_unix_open_pipe_internal’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:393:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:394:8: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:394:8: call_function: calling ‘g_unix_open_pipe_internal’ from ‘stack_trace’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:394:8: return_function: returning to ‘stack_trace’ from ‘g_unix_open_pipe_internal’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:393:7: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:400:9: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:401:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:404:21: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:405:10: branch_true: following ‘true’ branch (when ‘old_err != -1’)...
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:407:23: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:413:7: call_function: calling ‘checked_dup’ from ‘stack_trace’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:413:7: return_function: returning to ‘stack_trace’ from ‘checked_dup’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:415:7: call_function: calling ‘checked_dup’ from ‘stack_trace’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:415:7: return_function: returning to ‘stack_trace’ from ‘checked_dup’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:416:7: release_resource: first ‘close’ here
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:417:7: call_function: calling ‘checked_dup’ from ‘stack_trace’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:417:7: return_function: returning to ‘stack_trace’ from ‘checked_dup’
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:422:10: branch_true: following ‘true’ branch (when ‘old_err != -1’)...
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:424:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gbacktrace.c:424:11: danger: second ‘close’ here; first ‘close’ was at [(42)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/41)
#  422|         if (old_err != -1)
#  423|           {
#  424|->           close (2);
#  425|             /* We can ignore the return value here as we're failing anyways */
#  426|             (void) !dup (old_err);

Error: GCC_ANALYZER_WARNING (CWE-787): [#def592]
glib-2.84.1/redhat-linux-build/../glib/gbsearcharray.h:133:3: warning[-Wanalyzer-out-of-bounds]: buffer overflow
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1967:1: enter_function: entry to ‘g_signal_override_class_closure’
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1977:10: call_function: inlined call to ‘LOOKUP_SIGNAL_NODE’ from ‘g_signal_override_class_closure’
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1983:26: call_function: calling ‘signal_find_class_closure’ from ‘g_signal_override_class_closure’
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1983:26: return_function: returning to ‘g_signal_override_class_closure’ from ‘signal_find_class_closure’
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1985:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1988:9: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1988:9: call_function: calling ‘signal_add_class_closure’ from ‘g_signal_override_class_closure’
#  131|       size = G_BSEARCH_UPPER_POWER2 (size);
#  132|     barray = (GBSearchArray *) g_malloc (size);
#  133|->   memset (barray, 0, sizeof (GBSearchArray));
#  134|   
#  135|     return barray;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def593]
glib-2.84.1/redhat-linux-build/../glib/gconvert.c:483:6: warning[-Wanalyzer-malloc-leak]: leak of ‘open_converter(to_codeset,  from_codeset,  error)’
glib-2.84.1/redhat-linux-build/../glib/gconvert.c:1895:1: enter_function: entry to ‘g_filename_display_name’
glib-2.84.1/redhat-linux-build/../glib/gconvert.c:1902:13: call_function: calling ‘g_get_filename_charsets’ from ‘g_filename_display_name’
glib-2.84.1/redhat-linux-build/../glib/gconvert.c:1902:13: return_function: returning to ‘g_filename_display_name’ from ‘g_get_filename_charsets’
glib-2.84.1/redhat-linux-build/../glib/gconvert.c:1915:33: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/gconvert.c:1917:26: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gconvert.c:1917:26: call_function: calling ‘g_convert’ from ‘g_filename_display_name’
#  481|     cd = open_converter (to_codeset, from_codeset, error);
#  482|   
#  483|->   if (cd == (GIConv) -1)
#  484|       {
#  485|         if (bytes_read)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def594]
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3460:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3432:1: enter_function: entry to ‘g_key_file_set_group_comment’
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3441:3: branch_true: following ‘true’ branch (when ‘group_name’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3441:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3441:3: call_function: calling ‘g_key_file_is_group_name’ from ‘g_key_file_set_group_comment’
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3441:3: return_function: returning to ‘g_key_file_set_group_comment’ from ‘g_key_file_is_group_name’
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3441:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3443:11: call_function: inlined call to ‘g_key_file_lookup_group’ from ‘g_key_file_set_group_comment’
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3444:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3454:16: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3454:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3459:16: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3460:11: danger: dereference of NULL ‘g_key_file_lookup_group_node(key_file,  group_name)’
# 3458|      */
# 3459|     group_node = g_key_file_lookup_group_node (key_file, group_name);
# 3460|->   group = group_node->next->data;
# 3461|     for (GList *lp = group->key_value_pairs; lp != NULL; )
# 3462|       {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def595]
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3689:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3670:1: enter_function: entry to ‘g_key_file_get_group_comment’
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3677:11: call_function: inlined call to ‘g_key_file_lookup_group’ from ‘g_key_file_get_group_comment’
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3678:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3688:16: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3689:3: danger: dereference of NULL ‘g_key_file_lookup_group_node(key_file,  group_name)’
# 3687|   
# 3688|     group_node = g_key_file_lookup_group_node (key_file, group_name);
# 3689|->   group_node = group_node->next;
# 3690|     group = (GKeyFileGroup *)group_node->data;  
# 3691|     return get_group_comment (key_file, group, error);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def596]
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:4371:18: warning[-Wanalyzer-null-argument]: use of NULL ‘value’ where non-null expected
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3236:1: enter_function: entry to ‘g_key_file_get_double_list’
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3247:3: branch_true: following ‘true’ branch (when ‘key_file’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3248:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3248:3: branch_true: following ‘true’ branch (when ‘group_name’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3249:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3249:3: branch_true: following ‘true’ branch (when ‘key’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3251:6: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:3254:12: call_function: calling ‘g_key_file_get_string_list’ from ‘g_key_file_get_double_list’
#argument 1 of ‘__builtin_strlen’ must be non-null
# 4369|     g_assert (pieces == NULL || *pieces == NULL);
# 4370|   
# 4371|->   string_value = g_new (gchar, strlen (value) + 1);
# 4372|   
# 4373|     p = value;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def597]
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:4572:16: warning[-Wanalyzer-null-argument]: use of NULL ‘value’ where non-null expected
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:2765:1: enter_function: entry to ‘g_key_file_get_integer’
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:2774:3: branch_true: following ‘true’ branch (when ‘key_file’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:2775:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:2775:3: branch_true: following ‘true’ branch (when ‘group_name’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:2776:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:2776:3: branch_true: following ‘true’ branch (when ‘key’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:2778:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:2780:11: call_function: calling ‘g_key_file_get_value’ from ‘g_key_file_get_integer’
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:2780:11: return_function: returning to ‘g_key_file_get_integer’ from ‘g_key_file_get_value’
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:2782:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:2788:15: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/gkeyfile.c:2788:15: call_function: calling ‘g_key_file_parse_value_as_integer’ from ‘g_key_file_get_integer’
# 4570|   
# 4571|     errno = 0;
# 4572|->   long_value = strtol (value, &eof_int, 10);
# 4573|     errsv = errno;
# 4574|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def598]
glib-2.84.1/redhat-linux-build/../glib/gmessages.c:3485:13: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
glib-2.84.1/redhat-linux-build/../glib/gmessages.c:3470:1: enter_function: entry to ‘print_string’
glib-2.84.1/redhat-linux-build/../glib/gmessages.c:3476:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/gmessages.c:3483:33: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/gmessages.c:3483:33: call_function: calling ‘strdup_convert’ from ‘print_string’
glib-2.84.1/redhat-linux-build/../glib/gmessages.c:3483:33: return_function: returning to ‘print_string’ from ‘strdup_convert’
glib-2.84.1/redhat-linux-build/../glib/gmessages.c:3485:13: danger: argument 1 (‘strdup_convert(string,  charset)’) NULL where non-null expected
# 3483|         gchar *converted_string = strdup_convert (string, charset);
# 3484|   
# 3485|->       ret = fputs (converted_string, stream);
# 3486|         g_free (converted_string);
# 3487|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def599]
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:484:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:464:1: enter_function: entry to ‘g_queue_push_nth_link’
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:471:3: branch_true: following ‘true’ branch (when ‘queue’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:472:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:472:3: branch_true: following ‘true’ branch (when ‘link_’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:474:6: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:474:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:480:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:481:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:481:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:483:10: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:483:10: call_function: calling ‘g_queue_peek_nth_link’ from ‘g_queue_push_nth_link’
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:483:10: return_function: returning to ‘g_queue_push_nth_link’ from ‘g_queue_peek_nth_link’
glib-2.84.1/redhat-linux-build/../glib/gqueue.c:484:3: danger: dereference of NULL ‘g_queue_peek_nth_link(queue, (unsigned int)n)’
#  482|   
#  483|     next = g_queue_peek_nth_link (queue, n);
#  484|->   prev = next->prev;
#  485|   
#  486|     if (prev)

Error: GCC_ANALYZER_WARNING: [#def600]
glib-2.84.1/redhat-linux-build/../glib/gtester.c:91:9: warning[-Wanalyzer-fd-use-without-check]: ‘write’ on possibly invalid file descriptor ‘-1’
glib-2.84.1/redhat-linux-build/../glib/gtester.c:685:1: enter_function: entry to ‘main’
glib-2.84.1/redhat-linux-build/../glib/gtester.c:691:3: call_function: calling ‘parse_args’ from ‘main’
glib-2.84.1/redhat-linux-build/../glib/gtester.c:691:3: return_function: returning to ‘main’ from ‘parse_args’
glib-2.84.1/redhat-linux-build/../glib/gtester.c:692:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/gtester.c:695:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/gtester.c:695:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/gtester.c:701:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/gtester.c:701:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/gtester.c:702:5: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gtester.c:705:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/gtester.c:714:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/gtester.c:714:3: call_function: calling ‘test_log_printfe’ from ‘main’
#   89|     va_end (args);
#   90|     do
#   91|->     r = write (log_fd, result, strlen (result));
#   92|     while (r < 0 && errno == EINTR);
#   93|     g_free (result);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def601]
glib-2.84.1/redhat-linux-build/../glib/gthread.c:953:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error’
glib-2.84.1/redhat-linux-build/../glib/gthread.c:943:1: enter_function: entry to ‘g_thread_new’
glib-2.84.1/redhat-linux-build/../glib/gthread.c:947:11: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../glib/gthread.c:950:12: call_function: calling ‘g_thread_new_internal’ from ‘g_thread_new’
glib-2.84.1/redhat-linux-build/../glib/gthread.c:950:12: return_function: returning to ‘g_thread_new’ from ‘g_thread_new_internal’
glib-2.84.1/redhat-linux-build/../glib/gthread.c:952:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/gthread.c:953:5: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/gthread.c:953:5: release_memory: ‘error’ is NULL
glib-2.84.1/redhat-linux-build/../glib/gthread.c:953:5: danger: dereference of NULL ‘error’
#  951|   
#  952|     if G_UNLIKELY (thread == NULL)
#  953|->     g_error ("creating thread '%s': %s", name ? name : "", error->message);
#  954|   
#  955|     return thread;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def602]
glib-2.84.1/redhat-linux-build/../glib/gutils.c:748:57: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../glib/gutils.c:2259:1: enter_function: entry to ‘load_user_special_dirs’
glib-2.84.1/redhat-linux-build/../glib/gutils.c:2267:16: call_function: calling ‘g_build_user_config_dir’ from ‘load_user_special_dirs’
#  746|                   name_parts = g_strsplit (gecos_fields[0], "&", 0);
#  747|                   uppercase_pw_name = g_strdup (pw->pw_name);
#  748|->                 uppercase_pw_name[0] = g_ascii_toupper (uppercase_pw_name[0]);
#  749|                   e.real_name = g_strjoinv (uppercase_pw_name, name_parts);
#  750|                   g_strfreev (gecos_fields);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def603]
glib-2.84.1/redhat-linux-build/../glib/gutils.c:748:57: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘config_dir’
glib-2.84.1/redhat-linux-build/../glib/gutils.c:2259:1: enter_function: entry to ‘load_user_special_dirs’
glib-2.84.1/redhat-linux-build/../glib/gutils.c:2267:16: call_function: calling ‘g_build_user_config_dir’ from ‘load_user_special_dirs’
#  746|                   name_parts = g_strsplit (gecos_fields[0], "&", 0);
#  747|                   uppercase_pw_name = g_strdup (pw->pw_name);
#  748|->                 uppercase_pw_name[0] = g_ascii_toupper (uppercase_pw_name[0]);
#  749|                   e.real_name = g_strjoinv (uppercase_pw_name, name_parts);
#  750|                   g_strfreev (gecos_fields);

Error: GCC_ANALYZER_WARNING (CWE-835): [#def604]
glib-2.84.1/redhat-linux-build/../glib/tests/constructor-helper.c:158:5: warning[-Wanalyzer-infinite-loop]: infinite loop
glib-2.84.1/redhat-linux-build/../glib/tests/constructor-helper.c:148:1: enter_function: entry to ‘string_add’
glib-2.84.1/redhat-linux-build/../glib/tests/constructor-helper.c:158:5: danger: infinite loop here
#  156|   
#  157|     if (size > sizeof (buffer) - position)
#  158|->     g_error ("Not enough space in the buffer");
#  159|   
#  160|     memcpy_ (buffer + position, string, size);

Error: GCC_ANALYZER_WARNING (CWE-835): [#def605]
glib-2.84.1/redhat-linux-build/../glib/tests/constructor-helper.c:238:5: warning[-Wanalyzer-infinite-loop]: infinite loop
glib-2.84.1/redhat-linux-build/../glib/tests/constructor-helper.c:235:1: enter_function: entry to ‘string_check’
glib-2.84.1/redhat-linux-build/../glib/tests/constructor-helper.c:238:5: danger: infinite loop here
#  236|   {
#  237|     if (string_find_index_ (string) >= sizeof (buffer))
#  238|->     g_error ("String %s not present", string);
#  239|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def606]
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:263:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘priv’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: enter_function: entry to ‘g_error_with_test_error_private_init’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: call_function: calling ‘test_error_get_private’ from ‘g_error_with_test_error_private_init’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: return_function: returning to ‘g_error_with_test_error_private_init’ from ‘test_error_get_private’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: call_function: calling ‘test_error_private_init’ from ‘g_error_with_test_error_private_init’
#  261|     g_assert_nonnull (priv);
#  262|   
#  263|->   priv->foo = 13;
#  264|     /* If that triggers, it's test bug.
#  265|      */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def607]
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:280:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘dest_priv’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: enter_function: entry to ‘g_error_with_test_error_private_copy’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: call_function: calling ‘test_error_get_private’ from ‘g_error_with_test_error_private_copy’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: return_function: returning to ‘g_error_with_test_error_private_copy’ from ‘test_error_get_private’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: call_function: calling ‘test_error_get_private’ from ‘g_error_with_test_error_private_copy’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: return_function: returning to ‘g_error_with_test_error_private_copy’ from ‘test_error_get_private’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: call_function: calling ‘test_error_private_copy’ from ‘g_error_with_test_error_private_copy’
#  278|     g_assert_nonnull (dest_priv);
#  279|   
#  280|->   dest_priv->foo = src_priv->foo;
#  281|     dest_priv->check = src_priv->check;
#  282|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def608]
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:280:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘src_priv’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: enter_function: entry to ‘g_error_with_test_error_private_copy’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: call_function: calling ‘test_error_get_private’ from ‘g_error_with_test_error_private_copy’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: return_function: returning to ‘g_error_with_test_error_private_copy’ from ‘test_error_get_private’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: call_function: calling ‘test_error_get_private’ from ‘g_error_with_test_error_private_copy’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: return_function: returning to ‘g_error_with_test_error_private_copy’ from ‘test_error_get_private’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: call_function: calling ‘test_error_private_copy’ from ‘g_error_with_test_error_private_copy’
#  278|     g_assert_nonnull (dest_priv);
#  279|   
#  280|->   dest_priv->foo = src_priv->foo;
#  281|     dest_priv->check = src_priv->check;
#  282|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def609]
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:290:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘priv’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: enter_function: entry to ‘g_error_with_test_error_private_clear’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: call_function: calling ‘test_error_get_private’ from ‘g_error_with_test_error_private_clear’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: return_function: returning to ‘g_error_with_test_error_private_clear’ from ‘test_error_get_private’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:294:1: call_function: calling ‘test_error_private_clear’ from ‘g_error_with_test_error_private_clear’
#  288|   test_error_private_clear (TestErrorPrivate *priv)
#  289|   {
#  290|->   g_assert_nonnull (priv->check);
#  291|     priv->check->free_called++;
#  292|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def610]
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:302:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:297:1: enter_function: entry to ‘fill_test_error’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:299:34: call_function: calling ‘test_error_get_private’ from ‘fill_test_error’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:299:34: return_function: returning to ‘fill_test_error’ from ‘test_error_get_private’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:301:3: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:301:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:302:3: danger: dereference of NULL ‘test_error_get_private(error)’
#  300|   
#  301|     g_assert_nonnull (test_error);
#  302|->   test_error->check = check;
#  303|   
#  304|     return test_error;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def611]
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:338:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:308:1: enter_function: entry to ‘test_extended’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:318:15: call_function: calling ‘fill_test_error’ from ‘test_extended’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:318:15: return_function: returning to ‘test_extended’ from ‘fill_test_error’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:336:20: call_function: calling ‘test_error_get_private’ from ‘test_extended’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:336:20: return_function: returning to ‘test_extended’ from ‘test_error_get_private’
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:337:3: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:337:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/error.c:338:3: danger: dereference of NULL ‘test_error_get_private(g_error_copy(g_error_new_literal(test_error_quark(), 0, "foo")))’
#  336|     copy_test_priv = test_error_get_private (copy_error);
#  337|     g_assert_nonnull (copy_test_priv);
#  338|->   g_assert_cmpint (test_priv->foo, ==, copy_test_priv->foo);
#  339|   
#  340|     g_error_free (error);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def612]
glib-2.84.1/redhat-linux-build/../glib/tests/fileutils.c:2041:3: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen("file-test-data", "w")’ where non-null expected
glib-2.84.1/redhat-linux-build/../glib/tests/fileutils.c:2039:10: acquire_memory: allocated here
glib-2.84.1/redhat-linux-build/../glib/tests/fileutils.c:2040:3: release_memory: assuming ‘fopen("file-test-data", "w")’ is NULL
glib-2.84.1/redhat-linux-build/../glib/tests/fileutils.c:2040:3: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/fileutils.c:2040:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/fileutils.c:2041:3: danger: argument 1 (‘fopen("file-test-data", "w")’) NULL where non-null expected
# 2039|     file = fopen (filename, "w");
# 2040|     g_assert_nonnull (file);
# 2041|->   fclose (file);
# 2042|   
# 2043|     g_assert_no_errno (symlink (filename, link1));

Error: GCC_ANALYZER_WARNING (CWE-685): [#def613]
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:205:7: warning[-Wanalyzer-va-list-exhausted]: ‘args’ has no more arguments (3 consumed)
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:937:1: enter_function: entry to ‘test_lists_set_get’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:951:3: call_function: calling ‘check_string_list_value’ from ‘test_lists_set_get’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:951:3: return_function: returning to ‘test_lists_set_get’ from ‘check_string_list_value’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:952:3: call_function: calling ‘check_locale_string_list_value’ from ‘test_lists_set_get’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:952:3: return_function: returning to ‘test_lists_set_get’ from ‘check_locale_string_list_value’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:954:3: call_function: calling ‘check_double_list_value’ from ‘test_lists_set_get’ with 3 variadic arguments
#  203|         g_assert_cmpfloat (value[i], ==, v);
#  204|         i++;
#  205|->       v = va_arg (args, gdouble);
#  206|       }
#  207|   

Error: GCC_ANALYZER_WARNING (CWE-685): [#def614]
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:205:7: warning[-Wanalyzer-va-list-exhausted]: ‘args’ has no more arguments (4 consumed)
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:893:1: enter_function: entry to ‘test_lists’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:911:3: call_function: calling ‘check_string_list_value’ from ‘test_lists’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:911:3: return_function: returning to ‘test_lists’ from ‘check_string_list_value’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:912:3: call_function: calling ‘check_string_list_value’ from ‘test_lists’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:912:3: return_function: returning to ‘test_lists’ from ‘check_string_list_value’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:913:3: call_function: calling ‘check_string_list_value’ from ‘test_lists’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:913:3: return_function: returning to ‘test_lists’ from ‘check_string_list_value’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:914:3: call_function: calling ‘check_string_list_value’ from ‘test_lists’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:914:3: return_function: returning to ‘test_lists’ from ‘check_string_list_value’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:915:3: call_function: calling ‘check_boolean_list_value’ from ‘test_lists’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:915:3: return_function: returning to ‘test_lists’ from ‘check_boolean_list_value’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:916:3: call_function: calling ‘check_integer_list_value’ from ‘test_lists’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:916:3: return_function: returning to ‘test_lists’ from ‘check_integer_list_value’
glib-2.84.1/redhat-linux-build/../glib/tests/keyfile.c:917:3: call_function: calling ‘check_double_list_value’ from ‘test_lists’ with 4 variadic arguments
#  203|         g_assert_cmpfloat (value[i], ==, v);
#  204|         i++;
#  205|->       v = va_arg (args, gdouble);
#  206|       }
#  207|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def615]
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1316:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fds[1]’
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1314:3: branch_false: following ‘false’ branch (when ‘s != 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1314:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1316:13: danger: use of uninitialized value ‘fds[1]’ here
# 1314|     g_assert_cmpint (s, ==, 0);
# 1315|   
# 1316|->   to_read = fill_a_pipe (fds[1]);
# 1317|     /* write at higher priority to keep the pipe full... */
# 1318|     a = g_unix_fd_add_full (G_PRIORITY_HIGH, fds[1], G_IO_OUT, write_bytes, &to_write, NULL);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def616]
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1446:12: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fds[1]’
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1432:1: enter_function: entry to ‘test_unix_fd_source’
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1441:3: call_function: calling ‘assert_main_context_state’ from ‘test_unix_fd_source’
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1441:3: return_function: returning to ‘test_unix_fd_source’ from ‘assert_main_context_state’
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1444:3: branch_false: following ‘false’ branch (when ‘s != 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1444:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1446:12: danger: use of uninitialized value ‘fds[1]’ here
# 1444|     g_assert_cmpint (s, ==, 0);
# 1445|   
# 1446|->   source = g_unix_fd_source_new (fds[1], G_IO_OUT);
# 1447|     g_source_attach (source, NULL);
# 1448|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def617]
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1553:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fds_a[0]’
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1546:3: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1546:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1547:3: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1549:14: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/mainloop.c:1553:3: danger: use of uninitialized value ‘fds_a[0]’ here
# 1551|   
# 1552|     /* attach a source with more than one fd */
# 1553|->   g_source_add_unix_fd (source_a, fds_a[0], G_IO_IN);
# 1554|     g_source_add_unix_fd (source_a, fds_a[1], G_IO_OUT);
# 1555|     g_source_attach (source_a, NULL);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def618]
glib-2.84.1/redhat-linux-build/../glib/tests/markup-parse.c:237:7: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
glib-2.84.1/redhat-linux-build/../glib/tests/markup-parse.c:231:1: enter_function: entry to ‘get_expected_filename’
glib-2.84.1/redhat-linux-build/../glib/tests/markup-parse.c:237:7: danger: argument 1 (‘<unknown>’) NULL where non-null expected
#argument 1 of ‘__builtin_strstr’ must be non-null
#  235|   
#  236|     f = g_strdup (filename);
#  237|->   p = strstr (f, ".gmarkup");
#  238|     if (p)
#  239|       *p = 0;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def619]
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:248:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘test_pipe[1][0]’
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:213:15: branch_true: following ‘true’ branch (when ‘i != 4’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:215:15: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:226:19: branch_true: following ‘true’ branch (when ‘j != 3’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:228:26: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:226:19: branch_true: following ‘true’ branch (when ‘j != 3’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:228:26: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:248:33: danger: use of uninitialized value ‘test_pipe[1][0]’ here
#  246|               case STDOUT_PIPE:
#  247|                 g_assert_cmpint (j, ==, 2); /* only works for stderr */
#  248|->               test_pipe[j][0] = test_pipe[1][0];
#  249|                 test_pipe[j][1] = test_pipe[1][1];
#  250|                 break;

Error: GCC_ANALYZER_WARNING (CWE-666): [#def620]
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:426:17: warning[-Wanalyzer-fd-phase-mismatch]: ‘dup2’ on file descriptor ‘fd’ in wrong phase
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:416:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:419:12: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:419:12: acquire_resource: stream socket created here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:420:7: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:426:17: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:426:17: danger: ‘dup2’ expects a stream socket to be connected via ‘accept’ but ‘fd’ has not yet been bound
#  424|   #endif
#  425|         /* Set the socket as FD 2, stderr */
#  426|->       estatus = dup2 (fd, 2);
#  427|         g_assert_cmpint (estatus, >=, 0);
#  428|   

Error: GCC_ANALYZER_WARNING: [#def621]
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:426:17: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘fd’
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:416:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:419:12: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:420:7: branch_false: following ‘false’ branch (when ‘fd < 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:420:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-singlethread.c:426:17: danger: ‘fd’ could be invalid
#  424|   #endif
#  425|         /* Set the socket as FD 2, stderr */
#  426|->       estatus = dup2 (fd, 2);
#  427|         g_assert_cmpint (estatus, >=, 0);
#  428|   

Error: GCC_ANALYZER_WARNING: [#def622]
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:497:15: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘old_stderr_fd’
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:440:19: acquire_resource: opened here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:442:38: branch_true: following ‘true’ branch (when ‘output_return_state != 2’)...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:443:39: branch_true: following ‘true’ branch (when ‘error_return_state != 2’)...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:444:34: branch_true: following ‘true’ branch (when ‘stdin_state != 2’)...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:445:37: branch_true: following ‘true’ branch (when ‘stdout_state != 2’)...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:446:39: branch_true: following ‘true’ branch (when ‘stderr_state != 2’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:449:16: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_false: following ‘false’ branch (when ‘stderr_state != 1’)...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_false: following ‘false’ branch (when ‘stdout_state != 1’)...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_false: following ‘false’ branch (when ‘stdin_state != 1’)...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_true: following ‘true’ branch (when ‘error_return_state == 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:455:25: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:461:12: branch_false: following ‘false’ branch (when ‘stdin_state != 1’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:467:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:467:12: branch_false: following ‘false’ branch (when ‘stdout_state != 1’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:473:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:473:12: branch_false: following ‘false’ branch (when ‘stderr_state != 1’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:479:24: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:479:24: branch_true: following ‘true’ branch (when ‘error_return_state == 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:481:41: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:479:24: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:479:24: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:488:18: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:495:9: branch_false: following ‘false’ branch (when ‘_ptr’ is NULL)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:497:15: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:497:15: danger: ‘old_stderr_fd’ could be invalid: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  495|           g_clear_pointer (&argv, g_strfreev);
#  496|   
#  497|->         ret = dup2 (old_stderr_fd, STDERR_FILENO);
#  498|           g_assert_cmpint (ret, ==, STDERR_FILENO);
#  499|   

Error: GCC_ANALYZER_WARNING: [#def623]
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:500:15: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘old_stdout_fd’
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:439:19: acquire_resource: opened here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:442:38: branch_true: following ‘true’ branch (when ‘output_return_state != 2’)...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:443:39: branch_true: following ‘true’ branch (when ‘error_return_state != 2’)...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:444:34: branch_true: following ‘true’ branch (when ‘stdin_state != 2’)...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:445:37: branch_true: following ‘true’ branch (when ‘stdout_state != 2’)...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:446:39: branch_true: following ‘true’ branch (when ‘stderr_state != 2’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:449:16: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_false: following ‘false’ branch (when ‘stderr_state != 1’)...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_false: following ‘false’ branch (when ‘stdout_state != 1’)...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_false: following ‘false’ branch (when ‘stdin_state != 1’)...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_true: following ‘true’ branch (when ‘error_return_state == 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:455:25: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:461:12: branch_false: following ‘false’ branch (when ‘stdin_state != 1’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:467:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:467:12: branch_false: following ‘false’ branch (when ‘stdout_state != 1’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:473:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:473:12: branch_false: following ‘false’ branch (when ‘stderr_state != 1’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:479:24: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:479:24: branch_true: following ‘true’ branch (when ‘error_return_state == 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:481:41: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:479:24: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:479:24: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:488:18: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:495:9: branch_false: following ‘false’ branch (when ‘_ptr’ is NULL)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:497:15: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:498:9: branch_true: following ‘true’ branch (when ‘ret == 2’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:500:15: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:500:15: danger: ‘old_stdout_fd’ could be invalid: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  498|           g_assert_cmpint (ret, ==, STDERR_FILENO);
#  499|   
#  500|->         ret = dup2 (old_stdout_fd, STDOUT_FILENO);
#  501|           g_assert_cmpint (ret, ==, STDOUT_FILENO);
#  502|   

Error: GCC_ANALYZER_WARNING: [#def624]
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:503:15: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘old_stdin_fd’
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:438:18: acquire_resource: opened here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:442:38: branch_true: following ‘true’ branch (when ‘output_return_state != 2’)...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:443:39: branch_true: following ‘true’ branch (when ‘error_return_state != 2’)...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:444:34: branch_true: following ‘true’ branch (when ‘stdin_state != 2’)...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:445:37: branch_true: following ‘true’ branch (when ‘stdout_state != 2’)...
 branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:446:39: branch_true: following ‘true’ branch (when ‘stderr_state != 2’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:449:16: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_false: following ‘false’ branch (when ‘stderr_state != 1’)...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_false: following ‘false’ branch (when ‘stdout_state != 1’)...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_false: following ‘false’ branch (when ‘stdin_state != 1’)...
 branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_true: following ‘true’ branch (when ‘error_return_state == 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:455:25: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:453:9: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:461:12: branch_false: following ‘false’ branch (when ‘stdin_state != 1’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:467:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:467:12: branch_false: following ‘false’ branch (when ‘stdout_state != 1’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:473:12: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:473:12: branch_false: following ‘false’ branch (when ‘stderr_state != 1’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:479:24: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:479:24: branch_true: following ‘true’ branch (when ‘error_return_state == 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:481:41: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:479:24: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:479:24: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:488:18: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:495:9: branch_false: following ‘false’ branch (when ‘_ptr’ is NULL)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:497:15: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:498:9: branch_true: following ‘true’ branch (when ‘ret == 2’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:500:15: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:501:9: branch_true: following ‘true’ branch (when ‘ret == 1’)...
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:503:15: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/spawn-test.c:503:15: danger: ‘old_stdin_fd’ could be invalid: unchecked value from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  501|           g_assert_cmpint (ret, ==, STDOUT_FILENO);
#  502|   
#  503|->         ret = dup2 (old_stdin_fd, STDIN_FILENO);
#  504|           g_assert_cmpint (ret, ==, STDIN_FILENO);
#  505|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def625]
glib-2.84.1/redhat-linux-build/../glib/tests/strfuncs.c:928:10: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
glib-2.84.1/redhat-linux-build/../glib/tests/strfuncs.c:920:1: enter_function: entry to ‘do_test_strchug’
glib-2.84.1/redhat-linux-build/../glib/tests/strfuncs.c:928:10: danger: argument 1 (‘<unknown>’) NULL where non-null expected
#  926|   
#  927|     g_strchug (tmp);
#  928|->   res = (strcmp (tmp, expected) == 0);
#  929|     g_free (tmp);
#  930|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def626]
glib-2.84.1/redhat-linux-build/../glib/tests/strfuncs.c:964:10: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
glib-2.84.1/redhat-linux-build/../glib/tests/strfuncs.c:956:1: enter_function: entry to ‘do_test_strchomp’
glib-2.84.1/redhat-linux-build/../glib/tests/strfuncs.c:964:10: danger: argument 1 (‘<unknown>’) NULL where non-null expected
#  962|   
#  963|     g_strchomp (tmp);
#  964|->   res = (strcmp (tmp, expected) == 0);
#  965|     g_free (tmp);
#  966|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def627]
glib-2.84.1/redhat-linux-build/../glib/tests/strfuncs.c:1629:7: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
glib-2.84.1/redhat-linux-build/../glib/tests/strfuncs.c:1606:1: enter_function: entry to ‘check_strtod_string’
glib-2.84.1/redhat-linux-build/../glib/tests/strfuncs.c:1622:15: branch_true: following ‘true’ branch (when ‘l != 5’)...
glib-2.84.1/redhat-linux-build/../glib/tests/strfuncs.c:1624:14: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/strfuncs.c:1629:7: branch_true: following ‘true’ branch (when ‘check_end == 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/strfuncs.c:1629:7: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/strfuncs.c:1629:7: danger: argument 1 (‘<unknown>’) NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
# 1627|         d = g_ascii_strtod (number, &end);
# 1628|         g_assert_true (g_isnan (res) ? g_isnan (d) : (d == res));
# 1629|->       g_assert_true ((gsize) (end - number) ==
# 1630|                        (check_end ? correct_len : strlen (number)));
# 1631|       }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def628]
glib-2.84.1/redhat-linux-build/../glib/tests/string.c:744:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc(10)’ where non-null expected
glib-2.84.1/redhat-linux-build/../glib/tests/string.c:741:20: acquire_memory: this call could return NULL
glib-2.84.1/redhat-linux-build/../glib/tests/string.c:744:3: danger: argument 1 (‘malloc(10)’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#argument 1 of ‘__builtin_memcpy’ must be non-null
#  742|     GString *string;
#  743|   
#  744|->   strcpy (test_str, test_str_const);
#  745|     g_assert_cmpstr (test_str, ==, test_str_const);
#  746|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def629]
glib-2.84.1/redhat-linux-build/../glib/tests/testing.c:2572:23: warning[-Wanalyzer-null-argument]: use of NULL ‘interesting_lines’ where non-null expected
glib-2.84.1/redhat-linux-build/../glib/tests/testing.c:2570:3: branch_false: following ‘false’ branch (when ‘interesting_lines’ is NULL)...
glib-2.84.1/redhat-linux-build/../glib/tests/testing.c:2570:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/testing.c:2572:23: danger: argument 1 (‘interesting_lines’) NULL where non-null expected
#argument 1 of ‘__builtin_strstr’ must be non-null
# 2570|     g_assert_nonnull (interesting_lines);
# 2571|   
# 2572|->   interesting_lines = strstr (interesting_lines, TAP_SUBTEST_PREFIX "# /sub-stdout");
# 2573|     g_assert_nonnull (interesting_lines);
# 2574|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def630]
glib-2.84.1/redhat-linux-build/../glib/tests/testing.c:2628:23: warning[-Wanalyzer-null-argument]: use of NULL ‘interesting_lines’ where non-null expected
glib-2.84.1/redhat-linux-build/../glib/tests/testing.c:2626:3: branch_false: following ‘false’ branch (when ‘interesting_lines’ is NULL)...
glib-2.84.1/redhat-linux-build/../glib/tests/testing.c:2626:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/testing.c:2628:23: danger: argument 1 (‘interesting_lines’) NULL where non-null expected
#argument 1 of ‘__builtin_strstr’ must be non-null
# 2626|     g_assert_nonnull (interesting_lines);
# 2627|   
# 2628|->   interesting_lines = strstr (interesting_lines, TAP_SUBTEST_PREFIX "# /sub-stdout-no-nl");
# 2629|     g_assert_nonnull (interesting_lines);
# 2630|   

Error: GCC_ANALYZER_WARNING (CWE-835): [#def631]
glib-2.84.1/redhat-linux-build/../glib/tests/thread-pool.c:246:14: warning[-Wanalyzer-infinite-loop]: infinite loop
glib-2.84.1/redhat-linux-build/../glib/tests/thread-pool.c:246:14: danger: infinite loop here
glib-2.84.1/redhat-linux-build/../glib/tests/thread-pool.c:246:14: branch_true: if it ever follows ‘true’ branch, it will always do so...
 branch_true: ...to here
#  244|   
#  245|         /* Wait for the first job to complete before freeing the mutex and cond. */
#  246|->       while (g_atomic_int_get (&test_data.n_jobs_completed) != 1 ||
#  247|                g_atomic_int_get (&test_data.n_free_func_calls) != 1);
#  248|   

Error: GCC_ANALYZER_WARNING: [#def632]
glib-2.84.1/redhat-linux-build/../glib/tests/unix.c:317:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘stdin_fd’
glib-2.84.1/redhat-linux-build/../glib/tests/unix.c:299:14: acquire_resource: opened here
glib-2.84.1/redhat-linux-build/../glib/tests/unix.c:300:3: branch_true: following ‘true’ branch (when ‘stdin_fd > 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/unix.c:302:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/unix.c:317:9: danger: ‘stdin_fd’ could be invalid: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  315|     g_assert_no_error (error);
#  316|   
#  317|->   ret = dup2 (stdin_fd, STDIN_FILENO);
#  318|     g_assert_cmpint (ret, >=, 0);
#  319|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def633]
glib-2.84.1/redhat-linux-build/../glib/tests/unix.c:322:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ret’
glib-2.84.1/redhat-linux-build/../glib/tests/unix.c:300:3: branch_false: following ‘false’ branch (when ‘stdin_fd <= 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/unix.c:300:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/unix.c:317:9: acquire_resource: opened here
glib-2.84.1/redhat-linux-build/../glib/tests/unix.c:318:3: branch_true: following ‘true’ branch (when ‘ret >= 0’)...
glib-2.84.1/redhat-linux-build/../glib/tests/unix.c:320:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../glib/tests/unix.c:322:1: danger: ‘ret’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  320|     g_close (stdin_fd, &error);
#  321|     g_assert_no_error (error);
#  322|-> }
#  323|   
#  324|   static void

Error: GCC_ANALYZER_WARNING (CWE-685): [#def634]
glib-2.84.1/redhat-linux-build/../glib/tests/utils.c:55:7: warning[-Wanalyzer-va-list-exhausted]: ‘args’ has no more arguments (3 consumed)
glib-2.84.1/redhat-linux-build/../glib/tests/utils.c:93:1: enter_function: entry to ‘test_locale_variants’
glib-2.84.1/redhat-linux-build/../glib/tests/utils.c:98:3: call_function: calling ‘strv_check’ from ‘test_locale_variants’ with 3 variadic arguments
#   53|     for (i = 0; strv[i]; i++)
#   54|       {
#   55|->       s = va_arg (args, gchar*);
#   56|         if (g_strcmp0 (strv[i], s) != 0)
#   57|           {

Error: GCC_ANALYZER_WARNING (CWE-685): [#def635]
glib-2.84.1/redhat-linux-build/../glib/tests/utils.c:55:7: warning[-Wanalyzer-va-list-exhausted]: ‘args’ has no more arguments (5 consumed)
glib-2.84.1/redhat-linux-build/../glib/tests/utils.c:69:1: enter_function: entry to ‘test_language_names’
glib-2.84.1/redhat-linux-build/../glib/tests/utils.c:75:3: call_function: calling ‘strv_check’ from ‘test_language_names’ with 5 variadic arguments
#   53|     for (i = 0; strv[i]; i++)
#   54|       {
#   55|->       s = va_arg (args, gchar*);
#   56|         if (g_strcmp0 (strv[i], s) != 0)
#   57|           {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def636]
glib-2.84.1/redhat-linux-build/../gobject/gobject.c:5232:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gobject/gobject.c:5223:1: enter_function: entry to ‘object_remove_closure’
glib-2.84.1/redhat-linux-build/../gobject/gobject.c:5231:12: call_function: calling ‘g_object_get_qdata’ from ‘object_remove_closure’
glib-2.84.1/redhat-linux-build/../gobject/gobject.c:5231:12: return_function: returning to ‘object_remove_closure’ from ‘g_object_get_qdata’
glib-2.84.1/redhat-linux-build/../gobject/gobject.c:5232:19: danger: dereference of NULL ‘g_object_get_qdata(data,  quark_closure_array)’
# 5230|     object_bit_lock (object, OPTIONAL_BIT_LOCK_CLOSURE_ARRAY);
# 5231|     carray = g_object_get_qdata (object, quark_closure_array);
# 5232|->   for (i = 0; i < carray->n_closures; i++)
# 5233|       if (carray->closures[i] == closure)
# 5234|         {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def637]
glib-2.84.1/redhat-linux-build/../gobject/gparam.c:1293:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pspec’
glib-2.84.1/redhat-linux-build/../gobject/gparam.c:1279:1: enter_function: entry to ‘should_list_pspec’
glib-2.84.1/redhat-linux-build/../gobject/gparam.c:1290:7: call_function: calling ‘g_param_spec_get_redirect_target’ from ‘should_list_pspec’
glib-2.84.1/redhat-linux-build/../gobject/gparam.c:1290:7: return_function: returning to ‘should_list_pspec’ from ‘g_param_spec_get_redirect_target’
glib-2.84.1/redhat-linux-build/../gobject/gparam.c:1290:6: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gobject/gparam.c:1293:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gparam.c:1293:11: danger: dereference of NULL ‘pspec’
# 1291|       return FALSE;
# 1292|   
# 1293|->   found = param_spec_ht_lookup (ht, pspec->name, owner_type, TRUE);
# 1294|     if (found != pspec)
# 1295|       {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def638]
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1979:8: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1967:1: enter_function: entry to ‘g_signal_override_class_closure’
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1977:10: call_function: inlined call to ‘LOOKUP_SIGNAL_NODE’ from ‘g_signal_override_class_closure’
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1978:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1978:3: call_function: calling ‘node_check_deprecated’ from ‘g_signal_override_class_closure’
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1978:3: return_function: returning to ‘g_signal_override_class_closure’ from ‘node_check_deprecated’
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1979:8: danger: dereference of NULL ‘<unknown>’
# 1977|     node = LOOKUP_SIGNAL_NODE (signal_id);
# 1978|     node_check_deprecated (node);
# 1979|->   if (!g_type_is_a (instance_type, node->itype))
# 1980|       g_critical ("%s: type '%s' cannot be overridden for signal id '%u'", G_STRLOC, type_debug_name (instance_type), signal_id);
# 1981|     else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def639]
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:2456:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1967:1: enter_function: entry to ‘g_signal_override_class_closure’
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1977:10: call_function: inlined call to ‘LOOKUP_SIGNAL_NODE’ from ‘g_signal_override_class_closure’
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1978:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gsignal.c:1978:3: call_function: calling ‘node_check_deprecated’ from ‘g_signal_override_class_closure’
# 2454|     if (g_enable_diagnostic[0] == '1')
# 2455|       {
# 2456|->       if (node->flags & G_SIGNAL_DEPRECATED)
# 2457|           {
# 2458|             g_warning ("The signal %s::%s is deprecated and shouldn't be used "

Error: GCC_ANALYZER_WARNING (CWE-476): [#def640]
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:529:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:4256:1: enter_function: entry to ‘gobject_init’
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:4297:10: call_function: calling ‘type_node_fundamental_new_W’ from ‘gobject_init’
#  527|   
#  528|     finfo = type_node_fundamental_info_I (node);
#  529|->   finfo->type_flags = type_flags & TYPE_FUNDAMENTAL_FLAG_MASK;
#  530|   
#  531|     return node;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def641]
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:878:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:1205:1: enter_function: entry to ‘type_data_ref_Wm’
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:1209:25: call_function: inlined call to ‘lookup_type_node_I’ from ‘type_data_ref_Wm’
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:1213:7: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:1215:10: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:1229:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:1232:7: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:1232:7: call_function: calling ‘check_type_info_I’ from ‘type_data_ref_Wm’
#  876|     
#  877|     /* check instance members */
#  878|->   if (!(finfo->type_flags & G_TYPE_FLAG_INSTANTIATABLE) &&
#  879|         (info->instance_size || info->instance_init))
#  880|       {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def642]
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:3756:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:3720:1: enter_function: entry to ‘_g_type_test_flags’
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:3726:10: call_function: inlined call to ‘lookup_type_node_I’ from ‘_g_type_test_flags’
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:3727:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:3729:11: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:3729:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:3749:13: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:3752:10: branch_true: following ‘true’ branch (when ‘fflags != 0’)...
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:3754:41: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:3754:41: call_function: calling ‘type_node_fundamental_info_I’ from ‘_g_type_test_flags’
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:3754:41: return_function: returning to ‘_g_type_test_flags’ from ‘type_node_fundamental_info_I’
glib-2.84.1/redhat-linux-build/../gobject/gtype.c:3756:21: danger: dereference of NULL ‘type_node_fundamental_info_I(<unknown>)’
# 3754|   	  GTypeFundamentalInfo *finfo = type_node_fundamental_info_I (node);
# 3755|   	  
# 3756|-> 	  fflags = (finfo->type_flags & fflags) == fflags;
# 3757|   	}
# 3758|         else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def643]
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:335:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:327:1: enter_function: entry to ‘g_type_module_complete_type_info’
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:333:38: call_function: inlined call to ‘g_type_module_find_type_info’ from ‘g_type_module_complete_type_info’
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:335:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:335:3: danger: dereference of NULL ‘<unknown>’
#  333|     ModuleTypeInfo *module_type_info = g_type_module_find_type_info (module, g_type);
#  334|   
#  335|->   *info = module_type_info->info;
#  336|     
#  337|     if (module_type_info->info.value_table)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def644]
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:350:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:342:1: enter_function: entry to ‘g_type_module_complete_interface_info’
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:348:48: call_function: inlined call to ‘g_type_module_find_interface_info’ from ‘g_type_module_complete_interface_info’
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:350:3: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:350:3: danger: dereference of NULL ‘<unknown>’
#  348|     ModuleInterfaceInfo *module_interface_info = g_type_module_find_interface_info (module, instance_type, interface_type);
#  349|   
#  350|->   *info = module_interface_info->info;
#  351|   }
#  352|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def645]
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:420:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:379:1: enter_function: entry to ‘g_type_module_register_type’
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:388:3: branch_true: following ‘true’ branch (when ‘type_name’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:389:3: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:389:3: branch_true: following ‘true’ branch (when ‘type_info’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:391:6: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:391:6: branch_false: following ‘false’ branch (when ‘module’ is non-NULL)...
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:404:10: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:405:6: branch_true: following ‘true’ branch...
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:407:33: branch_true: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:409:10: branch_false: following ‘false’ branch...
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:418:26: call_function: inlined call to ‘g_type_module_find_type_info’ from ‘g_type_module_register_type’
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:420:11: branch_false: ...to here
glib-2.84.1/redhat-linux-build/../gobject/gtypemodule.c:420:11: danger: dereference of NULL ‘<unknown>’
#  418|         module_type_info = g_type_module_find_type_info (module, type);
#  419|   
#  420|->       if (module_type_info->parent_type != parent_type)
#  421|   	{
#  422|   	  const gchar *parent_type_name = g_type_name (parent_type);

Error: GCC_ANALYZER_WARNING (CWE-686): [#def646]
glib-2.84.1/redhat-linux-build/../gobject/tests/performance/performance-threaded.c:37:7: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘GType’ {{aka ‘long unsigned int’}} but received ‘int’ for variadic argument 1 of ‘args’
glib-2.84.1/redhat-linux-build/../gobject/tests/performance/performance-threaded.c:53:1: enter_function: entry to ‘register_types’
glib-2.84.1/redhat-linux-build/../gobject/tests/performance/performance-threaded.c:58:33: call_function: calling ‘simple_register_class’ from ‘register_types’ with 1 variadic argument
#   35|     for (;;)
#   36|       {
#   37|->       interface = va_arg (args, GType);
#   38|         if (interface == 0)
#   39|           break;

Error: GCC_ANALYZER_WARNING (CWE-835): [#def647]
glib-2.84.1/redhat-linux-build/../gobject/tests/threadtests.c:364:11: warning[-Wanalyzer-infinite-loop]: infinite loop
glib-2.84.1/redhat-linux-build/../gobject/tests/threadtests.c:364:11: danger: infinite loop here
glib-2.84.1/redhat-linux-build/../gobject/tests/threadtests.c:364:10: branch_true: if it ever follows ‘true’ branch, it will always do so...
glib-2.84.1/redhat-linux-build/../gobject/tests/threadtests.c:360:1: branch_true: ...to here
#  362|   
#  363|     /* Wait until the thread has started */
#  364|->   while (!g_atomic_int_get (&thread_data->started))
#  365|       continue;
#  366|   

Error: GCC_ANALYZER_WARNING (CWE-835): [#def648]
glib-2.84.1/redhat-linux-build/../gobject/tests/threadtests.c:370:11: warning[-Wanalyzer-infinite-loop]: infinite loop
glib-2.84.1/redhat-linux-build/../gobject/tests/threadtests.c:370:11: danger: infinite loop here
glib-2.84.1/redhat-linux-build/../gobject/tests/threadtests.c:370:10: branch_true: if it ever follows ‘true’ branch, it will always do so...
glib-2.84.1/redhat-linux-build/../gobject/tests/threadtests.c:360:1: branch_true: ...to here
#  368|   
#  369|     /* Wait for the thread to act, so that the object is still valid */
#  370|->   while (!g_atomic_int_get (&thread_data->finished))
#  371|       continue;
#  372|   

Error: GCC_ANALYZER_WARNING (CWE-835): [#def649]
glib-2.84.1/redhat-linux-build/../gobject/tests/threadtests.c:385:11: warning[-Wanalyzer-infinite-loop]: infinite loop
glib-2.84.1/redhat-linux-build/../gobject/tests/threadtests.c:385:11: danger: infinite loop here
glib-2.84.1/redhat-linux-build/../gobject/tests/threadtests.c:385:10: branch_true: if it ever follows ‘true’ branch, it will always do so...
glib-2.84.1/redhat-linux-build/../gobject/tests/threadtests.c:378:1: branch_true: ...to here
#  383|   
#  384|     /* Ensure we've started disposal */
#  385|->   while (!g_atomic_int_get (&thread_data->disposing))
#  386|       continue;
#  387|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def650]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:117:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘double’ but received ‘int’ for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:139:1: enter_function: entry to ‘test_collection’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:145:11: call_function: calling ‘collect’ from ‘test_collection’ with 1 variadic argument
#  115|   
#  116|     va_start (var_args, value);
#  117|->   G_VALUE_COLLECT (value, var_args, 0, &error);
#  118|     va_end (var_args);
#  119|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def651]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:117:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘long int’ but received ‘int’ for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:139:1: enter_function: entry to ‘test_collection’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:145:11: call_function: calling ‘collect’ from ‘test_collection’ with 1 variadic argument
#  115|   
#  116|     va_start (var_args, value);
#  117|->   G_VALUE_COLLECT (value, var_args, 0, &error);
#  118|     va_end (var_args);
#  119|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def652]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:117:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘void *’ but received ‘int’ for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:139:1: enter_function: entry to ‘test_collection’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:145:11: call_function: calling ‘collect’ from ‘test_collection’ with 1 variadic argument
#  115|   
#  116|     va_start (var_args, value);
#  117|->   G_VALUE_COLLECT (value, var_args, 0, &error);
#  118|     va_end (var_args);
#  119|   

Error: GCC_ANALYZER_WARNING (CWE-685): [#def653]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:117:3: warning[-Wanalyzer-va-list-exhausted]: ‘var_args’ has no more arguments (1 consumed)
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:139:1: enter_function: entry to ‘test_collection’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:145:11: call_function: calling ‘collect’ from ‘test_collection’ with 1 variadic argument
#  115|   
#  116|     va_start (var_args, value);
#  117|->   G_VALUE_COLLECT (value, var_args, 0, &error);
#  118|     va_end (var_args);
#  119|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def654]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘double’ but received ‘gchar *’ {{aka ‘char *’}} for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:233:1: enter_function: entry to ‘test_copying’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:243:13: call_function: calling ‘lcopy’ from ‘test_copying’ with 1 variadic argument
#  130|   
#  131|     va_start (var_args, value);
#  132|->   G_VALUE_LCOPY (value, var_args, 0, &error);
#  133|     va_end (var_args);
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def655]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘double’ but received ‘gint *’ {{aka ‘int *’}} for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:233:1: enter_function: entry to ‘test_copying’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:265:13: call_function: calling ‘lcopy’ from ‘test_copying’ with 1 variadic argument
#  130|   
#  131|     va_start (var_args, value);
#  132|->   G_VALUE_LCOPY (value, var_args, 0, &error);
#  133|     va_end (var_args);
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def656]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘double’ but received ‘guchar *’ {{aka ‘unsigned char *’}} for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:233:1: enter_function: entry to ‘test_copying’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:254:13: call_function: calling ‘lcopy’ from ‘test_copying’ with 1 variadic argument
#  130|   
#  131|     va_start (var_args, value);
#  132|->   G_VALUE_LCOPY (value, var_args, 0, &error);
#  133|     va_end (var_args);
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def657]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘double’ but received ‘guint *’ {{aka ‘unsigned int *’}} for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:233:1: enter_function: entry to ‘test_copying’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:276:13: call_function: calling ‘lcopy’ from ‘test_copying’ with 1 variadic argument
#  130|   
#  131|     va_start (var_args, value);
#  132|->   G_VALUE_LCOPY (value, var_args, 0, &error);
#  133|     va_end (var_args);
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def658]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘gchar *’ {{aka ‘char *’}} for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:233:1: enter_function: entry to ‘test_copying’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:243:13: call_function: calling ‘lcopy’ from ‘test_copying’ with 1 variadic argument
#  130|   
#  131|     va_start (var_args, value);
#  132|->   G_VALUE_LCOPY (value, var_args, 0, &error);
#  133|     va_end (var_args);
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def659]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘gint *’ {{aka ‘int *’}} for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:233:1: enter_function: entry to ‘test_copying’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:265:13: call_function: calling ‘lcopy’ from ‘test_copying’ with 1 variadic argument
#  130|   
#  131|     va_start (var_args, value);
#  132|->   G_VALUE_LCOPY (value, var_args, 0, &error);
#  133|     va_end (var_args);
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def660]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘guchar *’ {{aka ‘unsigned char *’}} for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:233:1: enter_function: entry to ‘test_copying’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:254:13: call_function: calling ‘lcopy’ from ‘test_copying’ with 1 variadic argument
#  130|   
#  131|     va_start (var_args, value);
#  132|->   G_VALUE_LCOPY (value, var_args, 0, &error);
#  133|     va_end (var_args);
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def661]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘guint *’ {{aka ‘unsigned int *’}} for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:233:1: enter_function: entry to ‘test_copying’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:276:13: call_function: calling ‘lcopy’ from ‘test_copying’ with 1 variadic argument
#  130|   
#  131|     va_start (var_args, value);
#  132|->   G_VALUE_LCOPY (value, var_args, 0, &error);
#  133|     va_end (var_args);
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def662]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘long int’ but received ‘gchar *’ {{aka ‘char *’}} for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:233:1: enter_function: entry to ‘test_copying’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:243:13: call_function: calling ‘lcopy’ from ‘test_copying’ with 1 variadic argument
#  130|   
#  131|     va_start (var_args, value);
#  132|->   G_VALUE_LCOPY (value, var_args, 0, &error);
#  133|     va_end (var_args);
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def663]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘long int’ but received ‘gint *’ {{aka ‘int *’}} for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:233:1: enter_function: entry to ‘test_copying’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:265:13: call_function: calling ‘lcopy’ from ‘test_copying’ with 1 variadic argument
#  130|   
#  131|     va_start (var_args, value);
#  132|->   G_VALUE_LCOPY (value, var_args, 0, &error);
#  133|     va_end (var_args);
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def664]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘long int’ but received ‘guchar *’ {{aka ‘unsigned char *’}} for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:233:1: enter_function: entry to ‘test_copying’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:254:13: call_function: calling ‘lcopy’ from ‘test_copying’ with 1 variadic argument
#  130|   
#  131|     va_start (var_args, value);
#  132|->   G_VALUE_LCOPY (value, var_args, 0, &error);
#  133|     va_end (var_args);
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-686): [#def665]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:132:3: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘long int’ but received ‘guint *’ {{aka ‘unsigned int *’}} for variadic argument 1 of ‘var_args’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:233:1: enter_function: entry to ‘test_copying’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:276:13: call_function: calling ‘lcopy’ from ‘test_copying’ with 1 variadic argument
#  130|   
#  131|     va_start (var_args, value);
#  132|->   G_VALUE_LCOPY (value, var_args, 0, &error);
#  133|     va_end (var_args);
#  134|   

Error: GCC_ANALYZER_WARNING (CWE-685): [#def666]
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:132:3: warning[-Wanalyzer-va-list-exhausted]: ‘var_args’ has no more arguments (1 consumed)
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:233:1: enter_function: entry to ‘test_copying’
glib-2.84.1/redhat-linux-build/../gobject/tests/value.c:243:13: call_function: calling ‘lcopy’ from ‘test_copying’ with 1 variadic argument
#  130|   
#  131|     va_start (var_args, value);
#  132|->   G_VALUE_LCOPY (value, var_args, 0, &error);
#  133|     va_end (var_args);
#  134|   

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-151.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameglib2-2.84.1-1.fc43
store-results-to/tmp/tmpioo1djsw/glib2-2.84.1-1.fc43.tar.xz
time-created2025-04-25 12:47:22
time-finished2025-04-25 12:59:25
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpioo1djsw/glib2-2.84.1-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpioo1djsw/glib2-2.84.1-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9