add Ulf Harnhammar's input_tab() segfault fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2101 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
9df069cc5f
commit
8091d334a3
|
@ -173,6 +173,9 @@ CVS code -
|
|||
open_prevfile(), open_nextfile()
|
||||
- Translate the "New Buffer" string when displaying "Switched
|
||||
to" messages on the statusbar. (DLR)
|
||||
input_tab()
|
||||
- Fix snprintf() call so that we don't segfault when trying to
|
||||
complete a filename containing %'s. (Ulf Harnhammar)
|
||||
- global.c:
|
||||
shortcut_init()
|
||||
- Remove redundant NANO_SMALL #ifdef. (DLR)
|
||||
|
|
|
@ -2406,7 +2406,7 @@ char *input_tab(char *buf, int place, bool *lastwastab, int *newplace,
|
|||
|
||||
/* make each filename shown be the same length as the
|
||||
longest filename, with two spaces at the end */
|
||||
snprintf(foo, longestname + 1, matches[i]);
|
||||
snprintf(foo, longestname + 1, "%s", matches[i]);
|
||||
while (strlen(foo) < longestname)
|
||||
strcat(foo, " ");
|
||||
|
||||
|
|
Loading…
Reference in New Issue