Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsepol: avoid passing NULL pointer to memcpy
memcpy(3) might be annotated with the function attribute nonnull and UBSan then complains: module.c:296:3: runtime error: null pointer passed as argument 2, which is declared to never be null #0 0x7f2468efa5b3 in link_netfilter_contexts ./libsepol/src/module.c:296 #1 0x7f2468efa5b3 in sepol_link_packages ./libsepol/src/module.c:337 #2 0x562331e9e123 in main ./semodule-utils/semodule_link/semodule_link.c:145 #3 0x7f2467e247ec in __libc_start_main ../csu/libc-start.c:332 #4 0x562331e9d2a9 in _start (./destdir/usr/bin/semodule_link+0x32a9) Signed-off-by: Christian Göttsche <[email protected]>
- Loading branch information