From f2c7a20142afdbeed1d96e074aeddeaa470f3124 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 3 Dec 2009 23:29:48 -0800 Subject: [PATCH] 8l: fix print line number format, buffer overflow R=ken2 https://golang.org/cl/165059 --- src/cmd/8l/list.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cmd/8l/list.c b/src/cmd/8l/list.c index 94ef97624c5..ec6a1fa0fbb 100644 --- a/src/cmd/8l/list.c +++ b/src/cmd/8l/list.c @@ -55,18 +55,18 @@ Pconv(Fmt *fp) switch(p->as) { case ATEXT: if(p->from.scale) { - sprint(str, "(%ld) %A %D,%d,%D", + sprint(str, "(%d) %A %D,%d,%D", p->line, p->as, &p->from, p->from.scale, &p->to); break; } default: - sprint(str, "(%ld) %A %D,%D", + sprint(str, "(%d) %A %D,%D", p->line, p->as, &p->from, &p->to); break; case ADATA: case AINIT: case ADYNT: - sprint(str, "(%ld) %A %D/%d,%D", + sprint(str, "(%d) %A %D/%d,%D", p->line, p->as, &p->from, p->from.scale, &p->to); break; } @@ -94,7 +94,7 @@ xsymname(Sym *s) int Dconv(Fmt *fp) { - char str[40], s[20]; + char str[200], s[200]; Adr *a; int i;