diff options
author | Alan Modra <amodra@gmail.com> | 2007-10-15 02:01:25 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-10-15 02:01:25 +0000 |
commit | 05f4ab67ff65655e11139d273fd53a602347a6c5 (patch) | |
tree | 149dd8af4daeffe66d22ef2429d7f4cbe9d9d147 /gas/read.c | |
parent | 615f314969111779bdaffaef0e00d13a0efd51f5 (diff) | |
download | gdb-05f4ab67ff65655e11139d273fd53a602347a6c5.zip gdb-05f4ab67ff65655e11139d273fd53a602347a6c5.tar.gz gdb-05f4ab67ff65655e11139d273fd53a602347a6c5.tar.bz2 |
* 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/read.c')
-rw-r--r-- | gas/read.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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; } |