summaryrefslogtreecommitdiff
path: root/target-i386/helper2.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-06-19 17:23:39 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-06-19 17:23:39 +0000
commiteba2af633fb8fa3b20ad578184d79e1f0eabcefe (patch)
treebcc44d0b0e8c36caa1c6701ce9362d009a01d0dd /target-i386/helper2.c
parent95ce326e5b47b4b841849f8a2ac7b96d6e204dfb (diff)
downloadqemu-eba2af633fb8fa3b20ad578184d79e1f0eabcefe.tar.gz
buffer overflow fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@932 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/helper2.c')
-rw-r--r--target-i386/helper2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-i386/helper2.c b/target-i386/helper2.c
index e0d917a738..1d5bdc17e4 100644
--- a/target-i386/helper2.c
+++ b/target-i386/helper2.c
@@ -212,7 +212,7 @@ void cpu_x86_dump_state(CPUX86State *env, FILE *f, int flags)
if (flags & X86_DUMP_CCOP) {
if ((unsigned)env->cc_op < CC_OP_NB)
- strcpy(cc_op_name, cc_op_str[env->cc_op]);
+ snprintf(cc_op_name, sizeof(cc_op_name), "%s", cc_op_str[env->cc_op]);
else
snprintf(cc_op_name, sizeof(cc_op_name), "[%d]", env->cc_op);
fprintf(f, "CCS=%08x CCD=%08x CCO=%-8s\n",