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]

Re: [PATCH] TUI: Fix buffer overflow in tui_expand_tabs


> From: Doug Evans <dje@google.com>
> Date: Fri, 20 Mar 2015 09:24:06 -0700
> Cc: anton@samba.org,
>     gdb-patches@sourceware.org
> 
> Nit.  To my eyes the following would be more readable.
> 
> -  int n_adjust;
> +  int nc, n_adjust;
>    const char *s;
>    char *ret, *q;
>  
>    /* 1. How many additional characters do we need?  */
> -  for (n_adjust = 0, s = string; s; )
> +  for (nc = col, n_adjust = 0, s = string; s; )

Thanks, pushed with that change (master and gdb-7.9-branch).


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