summaryrefslogtreecommitdiffstats
path: root/hw/s390x
diff options
context:
space:
mode:
authorThomas Huth2021-02-05 10:39:21 +0100
committerCornelia Huck2021-03-04 11:23:35 +0100
commitea1b90b4fcb1230b2c85f3fd4ee09a84ddca7a6f (patch)
tree3ce77900d8452063e90a371f0b05512a11bf139b /hw/s390x
parents390x/cpu_model: disallow unpack for --only-migratable (diff)
downloadqemu-ea1b90b4fcb1230b2c85f3fd4ee09a84ddca7a6f.tar.gz
qemu-ea1b90b4fcb1230b2c85f3fd4ee09a84ddca7a6f.tar.xz
qemu-ea1b90b4fcb1230b2c85f3fd4ee09a84ddca7a6f.zip
target/s390x/arch_dump: Fix warning for the name field in the PT_NOTE section
There is a compiler warning with GCC 9.3 when compiling with the -fsanitize=thread compiler flag: In function 'strncpy', inlined from 's390x_write_elf64_notes' at ../target/s390x/arch_dump.c:219:9: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 8 equals destination size [-Werror=stringop-truncation] Since the name should always be NUL-terminated, let's use g_strlcpy() to silence this warning. And while we're at it, also add an assert() to make sure that the provided names always fit the size field (which is fine for the current callers, the function is called once with "CORE" and once with "LINUX" as a name). Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20210205093921.848260-1-thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/s390x')
0 files changed, 0 insertions, 0 deletions