From: Uros Bizjak Date: Sun, 4 Jan 2015 15:35:57 +0000 (+0100) Subject: misc.c (internal_error_function): Use xasprintf instead of unchecked asprintf. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1a78ef4c0e265918c66828dc4cc479c0539ec225;p=gcc.git misc.c (internal_error_function): Use xasprintf instead of unchecked asprintf. * gcc-interface/misc.c (internal_error_function): Use xasprintf instead of unchecked asprintf. From-SVN: r219175 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a8eba2941f2..dadaa2520a8 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2015-01-04 Uros Bizjak + + * gcc-interface/misc.c (internal_error_function): Use xasprintf instead + of unchecked asprintf. + 2014-12-22 Eric Botcazou * gcc-interface/trans.c (Attribute_to_gnu) : If the diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 14c58da4c02..7e5b8d90b0a 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -326,9 +326,9 @@ internal_error_function (diagnostic_context *context, xloc = expand_location (input_location); if (context->show_column && xloc.column != 0) - asprintf (&loc, "%s:%d:%d", xloc.file, xloc.line, xloc.column); + loc = xasprintf ("%s:%d:%d", xloc.file, xloc.line, xloc.column); else - asprintf (&loc, "%s:%d", xloc.file, xloc.line); + loc = xasprintf ("%s:%d", xloc.file, xloc.line); temp_loc.Low_Bound = 1; temp_loc.High_Bound = strlen (loc); sp_loc.Bounds = &temp_loc;