aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-exp.y
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2009-04-14 19:04:24 +0000
committerPierre Muller <muller@sourceware.org>2009-04-14 19:04:24 +0000
commit88c15c34004057ccff9993d517b4df5ba1a0e6f8 (patch)
treede688f8560e89db7c5708d3d38840ff53010a190 /gdb/ada-exp.y
parent87f9adc16651f76ec058e50b2d31e8d675bc9165 (diff)
downloadfsf-binutils-gdb-88c15c34004057ccff9993d517b4df5ba1a0e6f8.zip
fsf-binutils-gdb-88c15c34004057ccff9993d517b4df5ba1a0e6f8.tar.gz
fsf-binutils-gdb-88c15c34004057ccff9993d517b4df5ba1a0e6f8.tar.bz2
ARI fix: sprintf rule.
* ada-exp.y (convert_char_literal): Replace sprintf by xsnprintf. * ada-lang.c (add_angle_brackets): Use xstrprintf. (ada_decode): Replace sprintf by xsnprintf. (find_old_style_renaming_symbol): Ditto. (ada_to_fixed_type_1, ada_enum_name): Ditto.
Diffstat (limited to 'gdb/ada-exp.y')
-rw-r--r--gdb/ada-exp.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index ee0fcf3..1d3c619 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -1452,7 +1452,7 @@ convert_char_literal (struct type *type, LONGEST val)
if (type == NULL || TYPE_CODE (type) != TYPE_CODE_ENUM)
return val;
- sprintf (name, "QU%02x", (int) val);
+ xsnprintf (name, sizeof (name), "QU%02x", (int) val);
for (f = 0; f < TYPE_NFIELDS (type); f += 1)
{
if (strcmp (name, TYPE_FIELD_NAME (type, f)) == 0)