[PATCH 0/2] gcc 9.2 strncpy(3) warnings fixes

Stefan Hajnoczi posted 2 patches 4 years, 1 month ago
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test checkpatch passed
Test FreeBSD passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200316160702.478964-1-stefanha@redhat.com
hw/rdma/vmw/pvrdma_dev_ring.c | 4 ++--
migration/global_state.c      | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
[PATCH 0/2] gcc 9.2 strncpy(3) warnings fixes
Posted by Stefan Hajnoczi 4 years, 1 month ago
I hit two strncpy(3) compiler warnings with gcc 9.2 and sanitizers enabled
recently.  Use QEMU's pstrcpy() function instead - it always NUL-terminates and
therefore eliminates the concerns behind this compiler warning.

Stefan Hajnoczi (2):
  migration: avoid suspicious strncpy() use
  hw/rdma: avoid suspicious strncpy() use

 hw/rdma/vmw/pvrdma_dev_ring.c | 4 ++--
 migration/global_state.c      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.24.1