mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
st/oxr: Fix oversized allocation in binding code
This commit is contained in:
parent
4f6b4761cb
commit
f20a0e14e0
|
@ -205,9 +205,9 @@ interaction_profile_find_or_create(struct oxr_logger *log,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add to the list of currently created interaction profiles.
|
// Add to the list of currently created interaction profiles.
|
||||||
size_t size =
|
U_ARRAY_REALLOC_OR_FREE(inst->profiles,
|
||||||
sizeof(struct oxr_interaction_profile) * (inst->num_profiles + 1);
|
struct oxr_interaction_profile *,
|
||||||
inst->profiles = realloc(inst->profiles, size);
|
(inst->num_profiles + 1));
|
||||||
inst->profiles[inst->num_profiles++] = p;
|
inst->profiles[inst->num_profiles++] = p;
|
||||||
|
|
||||||
*out_p = p;
|
*out_p = p;
|
||||||
|
|
Loading…
Reference in a new issue