Skip to content

FamStructWrapper: validate maximum capacity when doing new #99

@andreeaflorescu

Description

@andreeaflorescu

The new function in FamStructWrapper is not validating that num_elements is less than the maximum capacity that the type supports (as defined in FamStruct::max_len), and thus might result in allocating more elements than it was initially intended.

A change in FamStructWrapper requires changes in kvm-bindings as well, so we might want to fix the vmm-sys-util dependency in kvm-bindings before doing a release. It might be better to remove the vmm-sys-util dependency from kvm-bindings (as this change does not pertain to the scope of kvm-bindings), and implement FamStruct directly in kvm-ioctls where it is actually needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions