aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/intercept.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-01-29 10:52:17 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-01-29 10:52:17 +0000
commit45ce6547e6bde8cdf8f3dcaba833a3bda8f3c889 (patch)
tree9ce439909a9e3816fbac7b29bac84009fced953e /xen/arch/x86/hvm/intercept.c
parentc642ec17d0d541835334b676e972539fdd5becdc (diff)
downloadxen-45ce6547e6bde8cdf8f3dcaba833a3bda8f3c889.tar.gz
xen-45ce6547e6bde8cdf8f3dcaba833a3bda8f3c889.tar.bz2
xen-45ce6547e6bde8cdf8f3dcaba833a3bda8f3c889.zip
Replace sprintf with snprintf and strncpy with strlcpy.
There are various cases where no NULL-terminated strings are guaranteed and eventual possible overflows. This patch fixes them. From: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/arch/x86/hvm/intercept.c')
-rw-r--r--xen/arch/x86/hvm/intercept.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/intercept.c b/xen/arch/x86/hvm/intercept.c
index 9a454c6290..e5c1728b7d 100644
--- a/xen/arch/x86/hvm/intercept.c
+++ b/xen/arch/x86/hvm/intercept.c
@@ -173,7 +173,7 @@ int hvm_register_savevm(struct domain *d,
return -1;
}
- strncpy(se->idstr, idstr, HVM_SE_IDSTR_LEN);
+ strlcpy(se->idstr, idstr, HVM_SE_IDSTR_LEN);
se->instance_id = instance_id;
se->version_id = version_id;