From 091221ceea880013269f46e3bb2ad813927f2c55 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 18 Jul 1996 19:56:40 +0000 Subject: * config/tc-m68k.c (m68k_ip): Use the correct length when allocating space for the unsupported architecture error message. --- gas/ChangeLog | 5 +++++ gas/config/tc-m68k.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 85ddff7..323125a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +Thu Jul 18 15:54:54 1996 Ian Lance Taylor + + * config/tc-m68k.c (m68k_ip): Use the correct length when + allocating space for the unsupported architecture error message. + start-sanitize-d10v Thu Jul 18 12:57:10 1996 Michael Meissner diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index fcd9baf..4e8938c 100644 --- a/gas/config/tc-m68k.c +++ b/gas/config/tc-m68k.c @@ -1561,7 +1561,7 @@ m68k_ip (instring) && !(ok_arch & current_architecture)) { char buf[200], *cp; - int len; + strcpy (buf, "invalid instruction for this architecture; needs "); cp = buf + strlen (buf); @@ -1603,8 +1603,7 @@ m68k_ip (instring) } } } - len = cp - buf + 1; - cp = malloc (len); + cp = xmalloc (strlen (buf) + 1); strcpy (cp, buf); the_ins.error = cp; } -- cgit v1.1