diff options
8 files changed, 0 insertions, 370 deletions
diff --git a/recipes-extended/xen/files/shim-don-t-let-build-modify-shim.config.patch b/recipes-extended/xen/files/shim-don-t-let-build-modify-shim.config.patch deleted file mode 100644 index 74035283..00000000 --- a/recipes-extended/xen/files/shim-don-t-let-build-modify-shim.config.patch +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | From 8717e7417cebeae162fd61ea4cbdcdd422748f08 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Juergen Gross <jgross@suse.com> | ||
| 3 | Date: Fri, 20 Apr 2018 17:47:55 +0200 | ||
| 4 | Subject: [PATCH] shim: don't let build modify shim.config | ||
| 5 | |||
| 6 | Currently building the shim will modify shim.config in case some config | ||
| 7 | option was added or modified in the hypervisor. | ||
| 8 | |||
| 9 | Avoid that by copying shim.config to an intermediate file instead. | ||
| 10 | |||
| 11 | Signed-off-by: Juergen Gross <jgross@suse.com> | ||
| 12 | Reviewed-by: Jan Beulich <jbeulich@suse.com> | ||
| 13 | Acked-by: Wei Liu <wei.liu2@citrix.com> | ||
| 14 | --- | ||
| 15 | tools/firmware/xen-dir/Makefile | 16 ++++++---------- | ||
| 16 | 1 file changed, 6 insertions(+), 10 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/tools/firmware/xen-dir/Makefile b/tools/firmware/xen-dir/Makefile | ||
| 19 | index a7e69ae..84648c3 100644 | ||
| 20 | --- a/tools/firmware/xen-dir/Makefile | ||
| 21 | +++ b/tools/firmware/xen-dir/Makefile | ||
| 22 | @@ -41,16 +41,12 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE | ||
| 23 | $(D): linkfarm.stamp | ||
| 24 | $(MAKE) -C $(D)/xen distclean | ||
| 25 | |||
| 26 | -.PHONY: shim-%config | ||
| 27 | -shim-%config: $(D) FORCE | ||
| 28 | - $(MAKE) -C $(D)/xen $*config \ | ||
| 29 | - XEN_CONFIG_EXPERT=y \ | ||
| 30 | - KCONFIG_CONFIG=$(CURDIR)/shim.config | ||
| 31 | - | ||
| 32 | -xen-shim: $(D) shim-olddefconfig | ||
| 33 | - $(MAKE) -C $(D)/xen build \ | ||
| 34 | - XEN_CONFIG_EXPERT=y \ | ||
| 35 | - KCONFIG_CONFIG=$(CURDIR)/shim.config | ||
| 36 | +$(D)/xen/.config: shim.config $(D) | ||
| 37 | + cp $< $@ | ||
| 38 | + $(MAKE) -C $(@D) olddefconfig XEN_CONFIG_EXPERT=y | ||
| 39 | + | ||
| 40 | +xen-shim: $(D)/xen/.config | ||
| 41 | + $(MAKE) -C $(<D) build XEN_CONFIG_EXPERT=y | ||
| 42 | ln -sf $(D)/xen/xen $@ | ||
| 43 | ln -sf $(D)/xen/xen-syms $@-syms | ||
| 44 | |||
| 45 | -- | ||
| 46 | 2.7.4 | ||
| 47 | |||
diff --git a/recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch b/recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch deleted file mode 100644 index 2896d9f2..00000000 --- a/recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch +++ /dev/null | |||
| @@ -1,41 +0,0 @@ | |||
| 1 | From 7f601f7c341c80d554615556d60e3b8ed1e5ad4f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= | ||
| 3 | <marmarek@invisiblethingslab.com> | ||
| 4 | Date: Thu, 5 Apr 2018 03:50:54 +0200 | ||
| 5 | Subject: [PATCH] tools/gdbsx: fix -Wstringop-truncation warning | ||
| 6 | MIME-Version: 1.0 | ||
| 7 | Content-Type: text/plain; charset=UTF-8 | ||
| 8 | Content-Transfer-Encoding: 8bit | ||
| 9 | |||
| 10 | gcc-8 complains: | ||
| 11 | |||
| 12 | gx_main.c: In function 'prepare_stop_reply': | ||
| 13 | 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] | ||
| 14 | strncpy(buf, "watch:", 6); | ||
| 15 | ^~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 16 | |||
| 17 | Since terminating '\0' isn't needed here at all, switch to memcpy. | ||
| 18 | |||
| 19 | Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> | ||
| 20 | Acked-by: Wei Liu <wei.liu2@citrix.com> | ||
| 21 | Release-Acked-by: Juergen Gross <jgross@suse.com> | ||
| 22 | --- | ||
| 23 | tools/debugger/gdbsx/gx/gx_main.c | 2 +- | ||
| 24 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 25 | |||
| 26 | diff --git a/tools/debugger/gdbsx/gx/gx_main.c b/tools/debugger/gdbsx/gx/gx_main.c | ||
| 27 | index a908c45..6dfa501 100644 | ||
| 28 | --- a/tools/debugger/gdbsx/gx/gx_main.c | ||
| 29 | +++ b/tools/debugger/gdbsx/gx/gx_main.c | ||
| 30 | @@ -382,7 +382,7 @@ prepare_stop_reply(enum target_signal sig, char *buf, vcpuid_t vcpu) | ||
| 31 | |||
| 32 | /* TBD: check if we stopped because of watchpoint */ | ||
| 33 | if (watchpoint_stop()) { | ||
| 34 | - strncpy(buf, "watch:", 6); | ||
| 35 | + memcpy(buf, "watch:", 6); | ||
| 36 | buf += 6; | ||
| 37 | /* TBD: **/ | ||
| 38 | } | ||
| 39 | -- | ||
| 40 | 2.7.4 | ||
| 41 | |||
diff --git a/recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part1.patch b/recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part1.patch deleted file mode 100644 index f94d22c5..00000000 --- a/recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part1.patch +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | From 437e00fea04becc91c1b6bc1c0baa636b067a5cc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= | ||
| 3 | <marmarek@invisiblethingslab.com> | ||
| 4 | Date: Thu, 5 Apr 2018 03:50:55 +0200 | ||
| 5 | Subject: [PATCH] tools/kdd: mute spurious gcc warning | ||
| 6 | MIME-Version: 1.0 | ||
| 7 | Content-Type: text/plain; charset=UTF-8 | ||
| 8 | Content-Transfer-Encoding: 8bit | ||
| 9 | |||
| 10 | gcc-8 complains: | ||
| 11 | |||
| 12 | kdd.c:698:13: error: 'memcpy' offset [-204, -717] is out of the bounds [0, 216] of object 'ctrl' with type 'kdd_ctrl' {aka 'union <anonymous>'} [-Werror=array-bounds] | ||
| 13 | memcpy(buf, ((uint8_t *)&ctrl.c32) + offset, len); | ||
| 14 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 15 | kdd.c: In function 'kdd_select_callback': | ||
| 16 | kdd.c:642:14: note: 'ctrl' declared here | ||
| 17 | kdd_ctrl ctrl; | ||
| 18 | ^~~~ | ||
| 19 | |||
| 20 | But this is impossible - 'offset' is unsigned and correctly validated | ||
| 21 | few lines before. | ||
| 22 | |||
| 23 | Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> | ||
| 24 | Acked-by: Wei Liu <wei.liu2@citrix.com> | ||
| 25 | Release-Acked-by: Juergen Gross <jgross@suse.com> | ||
| 26 | --- | ||
| 27 | tools/debugger/kdd/kdd.c | 3 +++ | ||
| 28 | 1 file changed, 3 insertions(+) | ||
| 29 | |||
| 30 | diff --git a/tools/debugger/kdd/kdd.c b/tools/debugger/kdd/kdd.c | ||
| 31 | index 1bd5dd5..61d769e 100644 | ||
| 32 | --- a/tools/debugger/kdd/kdd.c | ||
| 33 | +++ b/tools/debugger/kdd/kdd.c | ||
| 34 | @@ -695,7 +695,10 @@ static void kdd_handle_read_ctrl(kdd_state *s) | ||
| 35 | KDD_LOG(s, "Request outside of known control space\n"); | ||
| 36 | len = 0; | ||
| 37 | } else { | ||
| 38 | +#pragma GCC diagnostic push | ||
| 39 | +#pragma GCC diagnostic ignored "-Warray-bounds" | ||
| 40 | memcpy(buf, ((uint8_t *)&ctrl.c32) + offset, len); | ||
| 41 | +#pragma GCC diagnostic pop | ||
| 42 | } | ||
| 43 | } | ||
| 44 | |||
| 45 | -- | ||
| 46 | 2.7.4 | ||
| 47 | |||
diff --git a/recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part2.patch b/recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part2.patch deleted file mode 100644 index afd14231..00000000 --- a/recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part2.patch +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 1 | From 2de2b10b2252761baa5dd0077df384dbfcca8212 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= | ||
| 3 | <marmarek@invisiblethingslab.com> | ||
| 4 | Date: Tue, 22 May 2018 21:47:45 +0200 | ||
| 5 | Subject: [PATCH] tools/kdd: alternative way of muting spurious gcc warning | ||
| 6 | MIME-Version: 1.0 | ||
| 7 | Content-Type: text/plain; charset=UTF-8 | ||
| 8 | Content-Transfer-Encoding: 8bit | ||
| 9 | |||
| 10 | Older gcc does not support #pragma GCC diagnostics, so use alternative | ||
| 11 | approach - change variable type to uint32_t (this code handle 32-bit | ||
| 12 | requests only anyway), which apparently also avoid gcc complaining about | ||
| 13 | this (otherwise correct) code. | ||
| 14 | |||
| 15 | Fixes 437e00fea04becc91c1b6bc1c0baa636b067a5cc "tools/kdd: mute spurious | ||
| 16 | gcc warning" | ||
| 17 | |||
| 18 | Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> | ||
| 19 | Acked-by: Wei Liu <wei.liu2@citrix.com> | ||
| 20 | Release-acked-by: Juergen Gross <jgross@suse.com> | ||
| 21 | Acked-by: Tim Deegan <tim@xen.org> | ||
| 22 | --- | ||
| 23 | tools/debugger/kdd/kdd.c | 5 +---- | ||
| 24 | 1 file changed, 1 insertion(+), 4 deletions(-) | ||
| 25 | |||
| 26 | diff --git a/tools/debugger/kdd/kdd.c b/tools/debugger/kdd/kdd.c | ||
| 27 | index 61d769e..5a019a0 100644 | ||
| 28 | --- a/tools/debugger/kdd/kdd.c | ||
| 29 | +++ b/tools/debugger/kdd/kdd.c | ||
| 30 | @@ -687,7 +687,7 @@ static void kdd_handle_read_ctrl(kdd_state *s) | ||
| 31 | } | ||
| 32 | } else { | ||
| 33 | /* 32-bit control-register space starts at 0x[2]cc, for 84 bytes */ | ||
| 34 | - uint64_t offset = addr; | ||
| 35 | + uint32_t offset = addr; | ||
| 36 | if (offset > 0x200) | ||
| 37 | offset -= 0x200; | ||
| 38 | offset -= 0xcc; | ||
| 39 | @@ -695,10 +695,7 @@ static void kdd_handle_read_ctrl(kdd_state *s) | ||
| 40 | KDD_LOG(s, "Request outside of known control space\n"); | ||
| 41 | len = 0; | ||
| 42 | } else { | ||
| 43 | -#pragma GCC diagnostic push | ||
| 44 | -#pragma GCC diagnostic ignored "-Warray-bounds" | ||
| 45 | memcpy(buf, ((uint8_t *)&ctrl.c32) + offset, len); | ||
| 46 | -#pragma GCC diagnostic pop | ||
| 47 | } | ||
| 48 | } | ||
| 49 | |||
| 50 | -- | ||
| 51 | 2.7.4 | ||
| 52 | |||
diff --git a/recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch b/recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch deleted file mode 100644 index 2d606cd3..00000000 --- a/recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | From fa7789ef18bd2e716997937af71b2e4b5b00a159 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= | ||
| 3 | <marmarek@invisiblethingslab.com> | ||
| 4 | Date: Thu, 5 Apr 2018 03:50:49 +0200 | ||
| 5 | Subject: [PATCH] tools/libxc: fix strncpy size | ||
| 6 | MIME-Version: 1.0 | ||
| 7 | Content-Type: text/plain; charset=UTF-8 | ||
| 8 | Content-Transfer-Encoding: 8bit | ||
| 9 | |||
| 10 | gcc-8 warns about possible truncation of trailing '\0'. | ||
| 11 | Final character is overridden by '\0' anyway, so don't bother to copy | ||
| 12 | it. | ||
| 13 | |||
| 14 | This fixes compile failure: | ||
| 15 | |||
| 16 | xc_pm.c: In function 'xc_set_cpufreq_gov': | ||
| 17 | xc_pm.c:308:5: error: 'strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation] | ||
| 18 | strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN); | ||
| 19 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 20 | cc1: all warnings being treated as errors | ||
| 21 | |||
| 22 | Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> | ||
| 23 | Acked-by: Wei Liu <wei.liu2@citrix.com> | ||
| 24 | Release-Acked-by: Juergen Gross <jgross@suse.com> | ||
| 25 | --- | ||
| 26 | tools/libxc/xc_pm.c | 2 +- | ||
| 27 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 28 | |||
| 29 | diff --git a/tools/libxc/xc_pm.c b/tools/libxc/xc_pm.c | ||
| 30 | index 67e2418..6f8d548 100644 | ||
| 31 | --- a/tools/libxc/xc_pm.c | ||
| 32 | +++ b/tools/libxc/xc_pm.c | ||
| 33 | @@ -305,7 +305,7 @@ int xc_set_cpufreq_gov(xc_interface *xch, int cpuid, char *govname) | ||
| 34 | sysctl.cmd = XEN_SYSCTL_pm_op; | ||
| 35 | sysctl.u.pm_op.cmd = SET_CPUFREQ_GOV; | ||
| 36 | sysctl.u.pm_op.cpuid = cpuid; | ||
| 37 | - strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN); | ||
| 38 | + strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN - 1); | ||
| 39 | scaling_governor[CPUFREQ_NAME_LEN - 1] = '\0'; | ||
| 40 | |||
| 41 | return xc_sysctl(xch, &sysctl); | ||
| 42 | -- | ||
| 43 | 2.7.4 | ||
| 44 | |||
diff --git a/recipes-extended/xen/files/tools-misc-fix-hypothetical-buffer-overflow.patch b/recipes-extended/xen/files/tools-misc-fix-hypothetical-buffer-overflow.patch deleted file mode 100644 index a4998619..00000000 --- a/recipes-extended/xen/files/tools-misc-fix-hypothetical-buffer-overflow.patch +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | From 27751d89248c8c5eef6d8b56eb8f7d2084145080 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= | ||
| 3 | <marmarek@invisiblethingslab.com> | ||
| 4 | Date: Thu, 5 Apr 2018 03:50:50 +0200 | ||
| 5 | Subject: [PATCH] tools/misc: fix hypothetical buffer overflow in xen-lowmemd | ||
| 6 | MIME-Version: 1.0 | ||
| 7 | Content-Type: text/plain; charset=UTF-8 | ||
| 8 | Content-Transfer-Encoding: 8bit | ||
| 9 | |||
| 10 | gcc-8 complains: | ||
| 11 | |||
| 12 | xen-lowmemd.c: In function 'handle_low_mem': | ||
| 13 | xen-lowmemd.c:80:55: error: '%s' directive output may be truncated writing up to 511 bytes into a region of size 489 [-Werror=format-truncation=] | ||
| 14 | snprintf(error, BUFSZ,"Failed to write target %s to xenstore", data); | ||
| 15 | ^~ ~~~~ | ||
| 16 | xen-lowmemd.c:80:9: note: 'snprintf' output between 36 and 547 bytes into a destination of size 512 | ||
| 17 | snprintf(error, BUFSZ,"Failed to write target %s to xenstore", data); | ||
| 18 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 19 | |||
| 20 | In practice it wouldn't happen, because 'data' contains string | ||
| 21 | representation of 64-bit unsigned number (20 characters at most). | ||
| 22 | But place a limit to mute gcc warning. | ||
| 23 | |||
| 24 | Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> | ||
| 25 | Acked-by: Wei Liu <wei.liu2@citrix.com> | ||
| 26 | Release-Acked-by: Juergen Gross <jgross@suse.com> | ||
| 27 | --- | ||
| 28 | tools/misc/xen-lowmemd.c | 2 +- | ||
| 29 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 30 | |||
| 31 | diff --git a/tools/misc/xen-lowmemd.c b/tools/misc/xen-lowmemd.c | ||
| 32 | index 865a54c..79ad34c 100644 | ||
| 33 | --- a/tools/misc/xen-lowmemd.c | ||
| 34 | +++ b/tools/misc/xen-lowmemd.c | ||
| 35 | @@ -77,7 +77,7 @@ void handle_low_mem(void) | ||
| 36 | if (!xs_write(xs_handle, XBT_NULL, | ||
| 37 | "/local/domain/0/memory/target", data, strlen(data))) | ||
| 38 | { | ||
| 39 | - snprintf(error, BUFSZ,"Failed to write target %s to xenstore", data); | ||
| 40 | + snprintf(error, BUFSZ,"Failed to write target %.24s to xenstore", data); | ||
| 41 | perror(error); | ||
| 42 | } | ||
| 43 | } | ||
| 44 | -- | ||
| 45 | 2.7.4 | ||
| 46 | |||
diff --git a/recipes-extended/xen/files/tools-xenpmd-fix-possible-0-truncation.patch b/recipes-extended/xen/files/tools-xenpmd-fix-possible-0-truncation.patch deleted file mode 100644 index 86a8e35f..00000000 --- a/recipes-extended/xen/files/tools-xenpmd-fix-possible-0-truncation.patch +++ /dev/null | |||
| @@ -1,74 +0,0 @@ | |||
| 1 | From 938c8f53b1f80175c6f7a1399efdb984abb0cb8b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= | ||
| 3 | <marmarek@invisiblethingslab.com> | ||
| 4 | Date: Thu, 5 Apr 2018 03:50:53 +0200 | ||
| 5 | Subject: [PATCH] tools/xenpmd: fix possible '\0' truncation | ||
| 6 | MIME-Version: 1.0 | ||
| 7 | Content-Type: text/plain; charset=UTF-8 | ||
| 8 | Content-Transfer-Encoding: 8bit | ||
| 9 | |||
| 10 | gcc-8 complains: | ||
| 11 | xenpmd.c:207:9: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation] | ||
| 12 | strncpy(info->oem_info, attrib_value, 32); | ||
| 13 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 14 | xenpmd.c:201:9: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation] | ||
| 15 | strncpy(info->battery_type, attrib_value, 32); | ||
| 16 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 17 | xenpmd.c:195:9: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation] | ||
| 18 | strncpy(info->serial_number, attrib_value, 32); | ||
| 19 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 20 | xenpmd.c:189:9: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation] | ||
| 21 | strncpy(info->model_number, attrib_value, 32); | ||
| 22 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 23 | |||
| 24 | Copy 31 chars, then make sure terminating '\0' is present. Those fields | ||
| 25 | are passed to strlen and as '%s' for snprintf later. | ||
| 26 | |||
| 27 | Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> | ||
| 28 | Acked-by: Wei Liu <wei.liu2@citrix.com> | ||
| 29 | Release-Acked-by: Juergen Gross <jgross@suse.com> | ||
| 30 | --- | ||
| 31 | tools/xenpmd/xenpmd.c | 12 ++++++++---- | ||
| 32 | 1 file changed, 8 insertions(+), 4 deletions(-) | ||
| 33 | |||
| 34 | diff --git a/tools/xenpmd/xenpmd.c b/tools/xenpmd/xenpmd.c | ||
| 35 | index 689c8fd..56412a9 100644 | ||
| 36 | --- a/tools/xenpmd/xenpmd.c | ||
| 37 | +++ b/tools/xenpmd/xenpmd.c | ||
| 38 | @@ -186,25 +186,29 @@ void set_attribute_battery_info(char *attrib_name, | ||
| 39 | |||
| 40 | if ( strstr(attrib_name, "model number") ) | ||
| 41 | { | ||
| 42 | - strncpy(info->model_number, attrib_value, 32); | ||
| 43 | + strncpy(info->model_number, attrib_value, 31); | ||
| 44 | + info->model_number[31] = '\0'; | ||
| 45 | return; | ||
| 46 | } | ||
| 47 | |||
| 48 | if ( strstr(attrib_name, "serial number") ) | ||
| 49 | { | ||
| 50 | - strncpy(info->serial_number, attrib_value, 32); | ||
| 51 | + strncpy(info->serial_number, attrib_value, 31); | ||
| 52 | + info->serial_number[31] = '\0'; | ||
| 53 | return; | ||
| 54 | } | ||
| 55 | |||
| 56 | if ( strstr(attrib_name, "battery type") ) | ||
| 57 | { | ||
| 58 | - strncpy(info->battery_type, attrib_value, 32); | ||
| 59 | + strncpy(info->battery_type, attrib_value, 31); | ||
| 60 | + info->battery_type[31] = '\0'; | ||
| 61 | return; | ||
| 62 | } | ||
| 63 | |||
| 64 | if ( strstr(attrib_name, "OEM info") ) | ||
| 65 | { | ||
| 66 | - strncpy(info->oem_info, attrib_value, 32); | ||
| 67 | + strncpy(info->oem_info, attrib_value, 31); | ||
| 68 | + info->oem_info[31] = '\0'; | ||
| 69 | return; | ||
| 70 | } | ||
| 71 | |||
| 72 | -- | ||
| 73 | 2.7.4 | ||
| 74 | |||
diff --git a/recipes-extended/xen/xen_4.10.1.bb b/recipes-extended/xen/xen_4.10.1.bb deleted file mode 100644 index 01c07889..00000000 --- a/recipes-extended/xen/xen_4.10.1.bb +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
| 2 | require xen.inc | ||
| 3 | |||
| 4 | SRC_URI = " \ | ||
| 5 | https://downloads.xenproject.org/release/xen/${PV}/xen-${PV}.tar.gz \ | ||
| 6 | file://tools-libxc-fix-strncpy-size.patch \ | ||
| 7 | file://tools-misc-fix-hypothetical-buffer-overflow.patch \ | ||
| 8 | file://tools-xentop-vwprintw.patch \ | ||
| 9 | file://tools-xenpmd-fix-possible-0-truncation.patch \ | ||
| 10 | file://tools-gdbsx-fix-Wstringop-truncation-warning.patch \ | ||
| 11 | file://tools-kdd-mute-spurious-gcc-warning-part1.patch \ | ||
| 12 | file://tools-kdd-mute-spurious-gcc-warning-part2.patch \ | ||
| 13 | file://shim-don-t-let-build-modify-shim.config.patch \ | ||
| 14 | " | ||
| 15 | |||
| 16 | SRC_URI[md5sum] = "d1b1d14ce76622062c9977d9c8ba772e" | ||
| 17 | SRC_URI[sha256sum] = "570d654f357d4085accdf752989c1cbc33e2075feac8fcc505d68bdb81b1a0cf" | ||
| 18 | |||
| 19 | S = "${WORKDIR}/xen-${PV}" | ||
