Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump version #27
Bump version #27
Changes from 1 commit
6afb78fe90c38711f04407b251a0cc18bab67c86ad6e40bf954e7ed62f7fc4fac8da60e179cb8e60814469d5e811834dc45c889697278108dd6338da220dd1c54d9332316566be16f42921fabd1017d59193455b02bc889353419ead16d0b9b634e8378932f1ef454141d0b6692f0893a1eabea2159f765e5e51c544c4f44f50e0ecfff03e3af023b852a1df260d7cb1a2f329d11793a571f28b28fcf236ae1b0cac61cccfc87ba4File filter
Filter by extension
Conversations
Jump to
gcc 12.0.1 failed building libmultipath due to a format-overflow false positive on 32-bit architectures. This isn't so surprising as format-overflow=2 is very aggressive in the assumptions it makes about the arguments. Here, it assumes that mpp->wwid could take up all the space that a pointer could point to, even if I add code to this function to explicitly null terminate mpp->wwid to fit in WWID_SIZE. To avoid this and simplify the function, switch from using calloc() and sprintf() to just using asprintf(). For reference, the gcc build error that this fixes is: devmapper.c: In function 'dm_addmap.constprop.0': devmapper.h:27:21: error: '%s' directive writing up to 2147483644 bytes into a region of size 2147483641 [-Werror=format-overflow=] 27 | #define UUID_PREFIX "mpath-" | ^~~~~~~~ devmapper.c:484:53: note: format string is defined here 484 | sprintf(prefixed_uuid, UUID_PREFIX "%s", mpp->wwid); | ^~ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Reviewed-by: Martin Wilck <mwilck@suse.com>There are no files selected for viewing