SHA256
1
0
forked from pool/qemu
qemu/s390x-Fix-stringop-truncation-issue-repo.patch
Bruce Rogers 607fbaf071 Accepting request 827680 from home:bfrogers:branches:Virtualization
- Fix compilation errors seen with pre-release gcc 11
  atomic.h-change-method-for-removing-C-qu.patch
  help-compiler-out-by-initializing-array.patch
  s390x-Fix-stringop-truncation-issue-repo.patch

(also tweak needed to previous submission)
(also minor tweak to update_git.sh, which is needed to correctly handle the state of git repo sitting on actual release commit.

OBS-URL: https://build.opensuse.org/request/show/827680
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=560
2020-08-18 20:41:08 +00:00

23 lines
1.1 KiB
Diff

From: Bruce Rogers <brogers@suse.com>
Date: Thu, 13 Aug 2020 14:03:29 -0600
Subject: s390x: Fix stringop-truncation issue reported by gcc 11
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
target/s390x/misc_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
index 58dbc023eb5495ec5da0321651ad..d8e18c0d4617c333fcd4cc1c5c8c 100644
--- a/target/s390x/misc_helper.c
+++ b/target/s390x/misc_helper.c
@@ -370,7 +370,7 @@ uint32_t HELPER(stsi)(CPUS390XState *env, uint64_t a0, uint64_t r0, uint64_t r1)
MIN(sizeof(sysib.sysib_322.vm[0].name),
strlen(qemu_name)));
strncpy((char *)sysib.sysib_322.ext_names[0], qemu_name,
- sizeof(sysib.sysib_322.ext_names[0]));
+ sizeof(sysib.sysib_322.ext_names[0] - 1));
} else {
ebcdic_put(sysib.sysib_322.vm[0].name, "TCGguest", 8);
strcpy((char *)sysib.sysib_322.ext_names[0], "TCGguest");