Commit 8091d334 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

add Ulf Harnhammar's input_tab() segfault fix

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2101 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 9df069cc
Showing with 4 additions and 1 deletion
+4 -1
......@@ -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, " ");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment