mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
gibaseinfo: Ensure the typelib offset is within the allowed limits
Even though we expose the offset as a size_t value, we actually have a less space for it, so let's ensure this is the case at runtime.
This commit is contained in:
parent
157f93d2ee
commit
acabaa1568
@ -321,6 +321,7 @@ gi_info_new_full (GIInfoType type,
|
||||
|
||||
g_return_val_if_fail (container != NULL || repository != NULL, NULL);
|
||||
g_return_val_if_fail (GI_IS_REPOSITORY (repository), NULL);
|
||||
g_return_val_if_fail (offset <= G_MAXUINT32, NULL);
|
||||
|
||||
gi_base_info_init_types ();
|
||||
g_assert (gi_base_info_types[type] != G_TYPE_INVALID);
|
||||
|
Loading…
Reference in New Issue
Block a user