Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tree: ignore false positive ASAN error
gcc complains with In function ‘nvme_ctrl_lookup_phy_slot’, inlined from ‘nvme_configure_ctrl’ at ../src/nvme/tree.c:1798:16: ../src/nvme/tree.c:1736:21: error: ‘strncmp’ specified bound 2 exceeds source size 0 [-Werror=stringop-overread] 1736 | strncmp(entry->d_name, "..", 2) != 0) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/nvme/tree.c:1748:40: error: ‘strdup’ reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread] 1748 | return strdup(entry->d_name); | ^~~~~~~~~~~~~~~~~~~~~ In function ‘nvme_configure_ctrl’: because d_name is defined as d_name[0] in POSIX but on Linux it is actually d_name[256] and is a valid NULL terminated string. Signed-off-by: Daniel Wagner <[email protected]>
- Loading branch information