aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utility.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utility.c b/utility.c
index 22eaff075..5dbe253a4 100644
--- a/utility.c
+++ b/utility.c
@@ -931,8 +931,8 @@ unsigned long my_getid(const char *filename, char *name, long id, long *gid)
}
}
if (id != -1 && id == rid) {
- memset(name, 0, 9*sizeof(char));
strncpy(name, rname, 8);
+ name[8]='\0';
if (gid) *gid = rgid;
fclose(file);
return (TRUE);