From 37d5a22bda6a1dfbac32d0c1dbe053c1a7b7e170 Mon Sep 17 00:00:00 2001 From: Dale Rahn Date: Sun, 21 Oct 2007 17:30:19 +0000 Subject: Make certain the output buffer is zeroed before starting processing. --- sys/arch/powerpc/ddb/db_disasm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/arch/powerpc/ddb') 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 == '%') { -- cgit v1.2.3