Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-4.5
xen
xen.7f601f7c341c80d554615556d60e3b8ed1e5ad4f.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xen.7f601f7c341c80d554615556d60e3b8ed1e5ad4f.patch of Package xen
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= <marmarek@invisiblethingslab.com> Date: Thu, 5 Apr 2018 03:50:54 +0200 Subject: 7f601f7c341c80d554615556d60e3b8ed1e5ad4f MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tools/gdbsx: fix -Wstringop-truncation warning gcc-8 complains: gx_main.c: In function 'prepare_stop_reply': gx_main.c:385:9: error: 'strncpy' output truncated before terminating nul copying 6 bytes from a string of the same length [-Werror=stringop-truncation] strncpy(buf, "watch:", 6); ^~~~~~~~~~~~~~~~~~~~~~~~~ Since terminating '\0' isn't needed here at all, switch to memcpy. Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Release-Acked-by: Juergen Gross <jgross@suse.com> --- tools/debugger/gdbsx/gx/gx_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/debugger/gdbsx/gx/gx_main.c +++ b/tools/debugger/gdbsx/gx/gx_main.c @@ -375,25 +375,25 @@ prepare_stop_reply(enum target_signal sig, char *buf, vcpuid_t vcpu) { int nib; *buf++ = 'T'; /* we stopped because of a trap (SIGTRAP) */ nib = ((sig & 0xf0) >> 4); *buf++ = gx_tohex(nib); nib = sig & 0x0f; *buf++ = gx_tohex(nib); /* TBD: check if we stopped because of watchpoint */ if (watchpoint_stop()) { - strncpy(buf, "watch:", 6); + memcpy(buf, "watch:", 6); buf += 6; /* TBD: **/ } sprintf(buf, "thread:%x;", vcpu); buf += strlen(buf); *buf++ = '\0'; } /* * Indicate the reason the guest halted */ static void process_reas_request(char *remote_buf, vcpuid_t vcpu)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor