Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/ia64/disasm Fix snprintf fallout



details:   https://anonhg.NetBSD.org/src/rev/c97b25029072
branches:  trunk
changeset: 795182:c97b25029072
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Apr 03 17:02:34 2014 +0000

description:
Fix snprintf fallout

diffstat:

 sys/arch/ia64/disasm/disasm.h        |  8 ++++----
 sys/arch/ia64/disasm/disasm_format.c |  4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r e40fa2dfd5d1 -r c97b25029072 sys/arch/ia64/disasm/disasm.h
--- a/sys/arch/ia64/disasm/disasm.h     Thu Apr 03 16:22:20 2014 +0000
+++ b/sys/arch/ia64/disasm/disasm.h     Thu Apr 03 17:02:34 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disasm.h,v 1.1 2006/04/07 14:21:18 cherry Exp $        */
+/*     $NetBSD: disasm.h,v 1.2 2014/04/03 17:02:34 martin Exp $        */
 
 /*-
  * Copyright (c) 2000-2003 Marcel Moolenaar
@@ -316,9 +316,9 @@
 
 int asm_decode(uint64_t, struct asm_bundle *);
 
-void asm_completer(const struct asm_cmpltr *, char *);
-void asm_mnemonic(const enum asm_op, char *);
-void asm_operand(const struct asm_oper *, char *, uint64_t);
+void asm_completer(const struct asm_cmpltr *, char *, size_t);
+void asm_mnemonic(const enum asm_op, char *, size_t);
+void asm_operand(const struct asm_oper *, char *, size_t, uint64_t);
 void asm_print_bundle(const struct asm_bundle *, uint64_t);
 void asm_print_inst(const struct asm_bundle *, int, uint64_t);
 
diff -r e40fa2dfd5d1 -r c97b25029072 sys/arch/ia64/disasm/disasm_format.c
--- a/sys/arch/ia64/disasm/disasm_format.c      Thu Apr 03 16:22:20 2014 +0000
+++ b/sys/arch/ia64/disasm/disasm_format.c      Thu Apr 03 17:02:34 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disasm_format.c,v 1.3 2014/03/27 18:22:56 christos Exp $       */
+/*     $NetBSD: disasm_format.c,v 1.4 2014/04/03 17:02:34 martin Exp $ */
 
 /*-
  * Copyright (c) 2000-2003 Marcel Moolenaar
@@ -287,7 +287,7 @@
        case 12: l = strlcpy(buf, "sp", buflen); break;
        case 13: l = strlcpy(buf, "tp", buflen); break;
        default:
-           l += snprintf(buf, buflen, "r%d", (int)o->o_value);
+           l = snprintf(buf, buflen, "r%d", (int)o->o_value);
            if (l > buflen)
                l = buflen;
            break;



Home | Main Index | Thread Index | Old Index