* [PATCH, ada]: Use xasprintf instead of unchecked asprintf
@ 2014-12-31 16:44 Uros Bizjak
2015-01-03 21:43 ` Eric Botcazou
0 siblings, 1 reply; 2+ messages in thread
From: Uros Bizjak @ 2014-12-31 16:44 UTC (permalink / raw)
To: gcc-patches; +Cc: Eric Botcazou
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
Hello!
The ada part.
2014-12-31 Uros Bizjak <ubizjak@gmail.com>
* gcc-interface/misc.c (internal_error_function): Use xasprintf instead
of unchecked asprintf.
Although almost trivial, this patch is *not* tested, so I'd kindly ask
someone to bootstrap and regresion test this patch.
Uros.
[-- Attachment #2: a.diff.txt --]
[-- Type: text/plain, Size: 1130 bytes --]
Index: ChangeLog
===================================================================
--- ChangeLog (revision 219123)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2014-12-31 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: gcc-interface/misc.c
===================================================================
--- gcc-interface/misc.c (revision 219123)
+++ gcc-interface/misc.c (working copy)
@@ -326,9 +326,9 @@ internal_error_function (diagnostic_context *conte
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH, ada]: Use xasprintf instead of unchecked asprintf
2014-12-31 16:44 [PATCH, ada]: Use xasprintf instead of unchecked asprintf Uros Bizjak
@ 2015-01-03 21:43 ` Eric Botcazou
0 siblings, 0 replies; 2+ messages in thread
From: Eric Botcazou @ 2015-01-03 21:43 UTC (permalink / raw)
To: Uros Bizjak; +Cc: gcc-patches
> 2014-12-31 Uros Bizjak <ubizjak@gmail.com>
>
> * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
> of unchecked asprintf.
>
> Although almost trivial, this patch is *not* tested, so I'd kindly ask
> someone to bootstrap and regresion test this patch.
Sanity checked only, but that's good enough so you can apply it, thanks.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-03 21:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-31 16:44 [PATCH, ada]: Use xasprintf instead of unchecked asprintf Uros Bizjak
2015-01-03 21:43 ` Eric Botcazou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).