]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gcc-interface/misc.c (internal_error_function): Use xasprintf instead
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 4 Jan 2015 15:35:57 +0000 (15:35 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 4 Jan 2015 15:35:57 +0000 (15:35 +0000)
of unchecked asprintf.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219175 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gcc-interface/misc.c

index a8eba2941f2951e04cb5defcd6a0fc7ae220e79e..dadaa2520a8f377ed8bd9801073475c25cf4c6e4 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-04  Uros Bizjak  <ubizjak@gmail.com>
+
+       * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
+       of unchecked asprintf.
+
 2014-12-22  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/trans.c (Attribute_to_gnu) <Attr_{Min,Max}>: If the
index 14c58da4c0299c37488984cca7b1a05030282f35..7e5b8d90b0a90671393634a8b3ce830b8dfa258f 100644 (file)
@@ -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;