summaryrefslogtreecommitdiff
path: root/gas/stabs.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2007-10-15 02:01:25 +0000
committerAlan Modra <amodra@bigpond.net.au>2007-10-15 02:01:25 +0000
commit33337736d0742c303766762611c83370d28268d7 (patch)
tree5cd26c7b338a712e14e09033678ac250de8abacf /gas/stabs.c
parentf44680e51f75097806d4f445fb4018ab2c00ef38 (diff)
downloadbinutils-redhat-33337736d0742c303766762611c83370d28268d7.tar.gz
* read.c (do_s_func): Check asprintf return status.
* stabs.c (stabs_generate_asm_func): Likewise. (stabs_generate_asm_endfunc): Likewise.
Diffstat (limited to 'gas/stabs.c')
-rw-r--r--gas/stabs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gas/stabs.c b/gas/stabs.c
index 275a32792e..69cca1de4b 100644
--- a/gas/stabs.c
+++ b/gas/stabs.c
@@ -669,8 +669,9 @@ stabs_generate_asm_func (const char *funcname, const char *startlabname)
}
as_where (&file, &lineno);
- asprintf (&buf, "\"%s:F1\",%d,0,%d,%s",
- funcname, N_FUN, lineno + 1, startlabname);
+ if (asprintf (&buf, "\"%s:F1\",%d,0,%d,%s",
+ funcname, N_FUN, lineno + 1, startlabname) == -1)
+ as_fatal ("%s", xstrerror (errno));
input_line_pointer = buf;
s_stab ('s');
free (buf);
@@ -695,7 +696,8 @@ stabs_generate_asm_endfunc (const char *funcname ATTRIBUTE_UNUSED,
++label_count;
colon (sym);
- asprintf (&buf, "\"\",%d,0,0,%s-%s", N_FUN, sym, startlabname);
+ if (asprintf (&buf, "\"\",%d,0,0,%s-%s", N_FUN, sym, startlabname) == -1)
+ as_fatal ("%s", xstrerror (errno));
input_line_pointer = buf;
s_stab ('s');
free (buf);