From 88c15c34004057ccff9993d517b4df5ba1a0e6f8 Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Tue, 14 Apr 2009 19:04:24 +0000 Subject: 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. --- gdb/ada-exp.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/ada-exp.y') 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) -- cgit v1.1