summaryrefslogtreecommitdiffstats
path: root/browser.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-11-09 11:06:28 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-11-09 11:06:28 +0000
commit27f760bfb0b57b3fcab537ddab2e20d1f6048033 (patch)
tree72531ec8f1686e5dd7a89c803396778200f30af2 /browser.c
parentfc1c8ec2843238b2cdddc12ff2944120242413a7 (diff)
The attached patch fixes a potential problem in folder_format_str()
where a fixed buffer might not be null terminated. From Vikas.
Diffstat (limited to 'browser.c')
-rw-r--r--browser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/browser.c b/browser.c
index 9326a3fc..6eeecf2b 100644
--- a/browser.c
+++ b/browser.c
@@ -172,7 +172,7 @@ folder_format_str (char *dest, size_t destlen, char op, const char *src,
}
break;
case 'f':
- strncpy (fn, folder->name, sizeof(fn) - 1);
+ strfcpy (fn, folder->name, sizeof(fn));
if (folder->f != NULL)
{
strcat (fn, S_ISLNK (folder->f->st_mode) ? "@" :