aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gas/read.c b/gas/read.c
index baf85be..379b3f2 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -5671,14 +5671,20 @@ do_s_func (int end_p, const char *default_prefix)
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;
}