GNOME Bugzilla – Bug 702755
g_bytes_get_data() annotation should use (element-type guint8)
Last modified: 2018-02-08 12:23:06 UTC
g_bytes_get_data()'s annotation of the return-value reads: * Returns: (transfer none) (array length=size) (type guint8): a pointer to the * byte data which leads to: <return-value transfer-ownership="none"> <doc xml:whitespace="preserve">a pointer to the byte data</doc> <array length="0" zero-terminated="0" c:type="gconstpointer"> <type name="guint8" c:type="gconstpointer"/> </array> </return-value> where the <type ... c:type="gconstpointer" /> results in lgi reading 8-bytes instead of just 1, ending up in invalid reads. https://github.com/pavouk/lgi/issues/57
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
A fix for the incorrect GIR result per se is submitted against glib source in bug #755961. A remaining issue for gobject-introspection is that the inferred C type for array elements turns out wrong, possibly somehow transferred from the array's C type.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/89.