Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ibacm: Ensure strings are NULL terminated
The 'data' and 'string_buf' string is often used in debugging prints, ensure it is always NULL terminated. Fixes gcc 10 warnings: In function 'strncpy', inlined from 'acm_format_ep_addr' at ../ibacm/src/libacm.c:205:3: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 64 equals destination size [-Werror=stringop-truncation] In function 'strncpy', inlined from '__acm_ep_insert_addr' at ../ibacm/src/acm.c:2119:2, inlined from 'acm_ep_insert_addr' at ../ibacm/src/acm.c:2140:9: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 64 equals destination size [-Werror=stringop-truncation] Signed-off-by: Jason Gunthorpe <[email protected]>
- Loading branch information