+2007-10-15 Alan Modra <amodra@bigpond.net.au>
+
+ * read.c (do_s_func): Check asprintf return status.
+ * stabs.c (stabs_generate_asm_func): Likewise.
+ (stabs_generate_asm_endfunc): Likewise.
+
2007-10-12 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (process_operands): Simplify implicit xmm0
if (*input_line_pointer != ',')
{
if (default_prefix)
- asprintf (&label, "%s%s", default_prefix, name);
+ {
+ if (asprintf (&label, "%s%s", default_prefix, name) == -1)
+ as_fatal ("%s", xstrerror (errno));
+ }
else
{
char leading_char = bfd_get_symbol_leading_char (stdoutput);
/* Missing entry point, use function's name with the leading
char prepended. */
if (leading_char)
- asprintf (&label, "%c%s", leading_char, name);
+ {
+ if (asprintf (&label, "%c%s", leading_char, name) == -1)
+ as_fatal ("%s", xstrerror (errno));
+ }
else
label = name;
}
}
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);
++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);