g_bytes_get_data() annotation should use (element-type guint8)
Submitted by Jan Kneschke
Link to original bug (#702755)
Description
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