Skip to content

Conversation

@sgallagher
Copy link

@sgallagher sgallagher commented Feb 7, 2024

add_rtattr_nest() is called in several places in the code. As part of its operation, it calls add_rtattr(nm type, NULL, 0) which results in NULL and 0 being passed to memcpy(). This fails with -Werror=nonnull on recent GCC.

add_rtattr_nest() is called in several places in the code. As part of
its operation, it calls add_rtattr(nm type, NULL, 0) which results in
NULL and 0 being passed to memcpy(). This fails with -Werror=nonnull
on recent GCC.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
@fweimer-rh
Copy link

It's possible that a future C standard will make this valid, too, but for now it's incorrect C without the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants