diff --git a/ChangeLog b/ChangeLog
index 7381c46f3ffceeb86f827ab0dad28fea903b2aec..2562dc92de3123bfd184d0bd760bcb3ea894d832 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
 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
diff --git a/src/files.c b/src/files.c
index 1d46917e1384a873c5387e54c7c6225153093590..6867853448e3e7c8fe46aa1f722f8a99ba6c63e3 100644
--- a/src/files.c
+++ b/src/files.c
@@ -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;