From a2c4a45e285c8d3d6b13b9cddffe866307a4926a Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 4 Jul 2008 02:49:44 +0300 Subject: [PATCH] obexd: Allocate correct amount of space for permissions attributes --- obexd/src/ftp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/obexd/src/ftp.c b/obexd/src/ftp.c index e4e75c056..416f7b5b7 100644 --- a/obexd/src/ftp.c +++ b/obexd/src/ftp.c @@ -76,10 +76,10 @@ static gchar *file_stat_line(gchar *filename, struct stat *fstat, struct stat *dstat) { - gchar perm[50], atime[17], ctime[17], mtime[17]; + gchar perm[51], atime[17], ctime[17], mtime[17]; gchar *escaped, *ret; - snprintf(perm, 49, "user-perm=\"%s%s%s\" group-perm=\"%s%s%s\" " + snprintf(perm, 50, "user-perm=\"%s%s%s\" group-perm=\"%s%s%s\" " "other-perm=\"%s%s%s\"", (fstat->st_mode & S_IRUSR ? "R" : ""), (fstat->st_mode & S_IWUSR ? "W" : ""), -- 2.47.3