summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2007-10-21 17:30:19 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2007-10-21 17:30:19 +0000
commit37d5a22bda6a1dfbac32d0c1dbe053c1a7b7e170 (patch)
tree291c41dae9e891f4e99f2269ec1d65531a81382c /sys/arch
parent834c2cd2926c732a9fcd2bb8c53f7affd044c5a4 (diff)
Make certain the output buffer is zeroed before starting processing.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/powerpc/ddb/db_disasm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/powerpc/ddb/db_disasm.c b/sys/arch/powerpc/ddb/db_disasm.c
index 0ceb8a12049..fc76ae10116 100644
--- a/sys/arch/powerpc/ddb/db_disasm.c
+++ b/sys/arch/powerpc/ddb/db_disasm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_disasm.c,v 1.14 2003/12/21 15:17:29 miod Exp $ */
+/* $OpenBSD: db_disasm.c,v 1.15 2007/10/21 17:30:18 drahn Exp $ */
/*
* Copyright (c) 1996, 2001, 2003 Dale Rahn. All rights reserved.
*
@@ -1080,6 +1080,7 @@ disasm_fields(u_int32_t addr, const struct opcode *popcode, instr_t instr,
return;
}
pfmt = popcode->decode_str;
+ disasm_str[0] = '\0';
while (*pfmt != '\0') {
if (*pfmt == '%') {