summaryrefslogtreecommitdiff
path: root/misc/mc/files/patch-vfs-vfs.c
blob: e8e132ba3c5cffcd36e6b733e9ffb520d3e8f34c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
--- vfs/vfs.c.orig	Thu Dec 26 08:21:43 2002
+++ vfs/vfs.c	Tue Jun 15 03:15:09 2004
@@ -637,8 +637,7 @@
 {
     const char *cwd = mc_return_cwd();
 
-    strncpy (buffer, cwd, size - 1);
-    buffer [size - 1] = 0;
+    g_strlcpy (buffer, cwd, size);
     return buffer;
 }