Commit 85307fe2 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

in input_tab(), since the field precision operator used in the sprintf()

uses ints and not size_t's, replace it with two strncpy()s, which use
size_t's


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3892 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 10 additions and 2 deletions
+10 -2
CVS code -
- files.c:
input_tab()
- Since the field precision operator used in the sprintf() uses
ints and not size_t's, replace it with two strncpy()s, which
use size_t's. (DLR)
- help.c:
parse_help_input()
- Add 'E' and 'e' as aliases for Exit, for consistency with the
......
......@@ -2239,8 +2239,11 @@ char *input_tab(char *buf, bool allow_files, size_t *place, bool
free(match2_mb);
mzero = charalloc(lastslash_len + common_len + 1);
sprintf(mzero, "%.*s%.*s", lastslash_len, buf, common_len,
matches[0]);
/*sprintf(mzero, "%.*s%.*s", lastslash_len, buf, common_len,
matches[0]);*/
strncpy(mzero, buf, lastslash_len);
strncpy(mzero + lastslash_len, matches[0], common_len);
common_len += lastslash_len;
......
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