This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMIT OBV] ARI fixes repalce sprintf by xsnprintf for char arrays


I applied under the obvious rule a
bunch of changes in which 
sprintf was used with a char array.

  In those case, using
sprint (var,
by 
xsnprintf (var, sizeof (var),
is an trivial change that ensures
that no buffer overflow happens.

  I will soon send a second patch  as a RFA
for less trivial changes.


Pierre Muller
as ARI maintainer


2012-11-20  Pierre Muller  <muller@sourceware.org>

        ARI fixes: sprintf rule.
        Replace sprintf function calls for char arrays by
        calls to xsnprintf calls.
        * arm-tdep.c (arm_push_dummy_call): Replace sprintf by xsnprintf.
        (arm_dwarf_reg_to_regnum, arm_return_value): Ditto.
        (arm_neon_quad_read, arm_pseudo_read): Ditto.
        (arm_neon_quad_write, arm_pseudo_write): Ditto.
        * breakpoint.c (condition_completer): Ditto.
        (create_tracepoint_from_upload): Ditto.
        * dwarf2read.c (file_full_name): Ditto.
        * gcore.c (gcore_command): Ditto.
        * gnu-nat.c (proc_string, gnu_pid_to_str): Ditto.
        * go32-nat.c (go32_sysinfo): Ditto.
        * interps.c (interp_set): Ditto.
        * m32c-tdep.c (make_types): Ditto.
        * ppc-linux-nat.c (fetch_register, store_register): Ditto.
        * remote-m32r-sdi.c (m32r_open): Ditto.
        * sol-thread.c (td_err_string): Ditto.
        (td_state_string, solaris_pid_to_str): Ditto.
        * symtab.c (gdb_mangle_name): Ditto.
        * cli/cli-script.c (execute_control_command): Ditto.
        (define_command, document_command): Ditto.
        * tui/tui-io.c (tui_rl_display_match_list): Ditto.
        * tui/tui-stack.c (tui_make_status_line): Ditto.
        * tui/tui-win.c (tui_update_gdb_sizes): Ditto.

Attachment: ARI-sprint-final.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]