summaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorEric Andersen2000-12-11 19:37:19 +0000
committerEric Andersen2000-12-11 19:37:19 +0000
commit5c365da88438f8af9a4314d7a305cc3fd9be4843 (patch)
tree58bf09396f27cd915cedaaa814c73a4eac23ffc8 /utility.c
parent4ed17829ac088b568c166e2cb7d51d553231a247 (diff)
downloadbusybox-5c365da88438f8af9a4314d7a305cc3fd9be4843.zip
busybox-5c365da88438f8af9a4314d7a305cc3fd9be4843.tar.gz
Fix non-NULL terminated strings.
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/utility.c b/utility.c
index 62c4728..22eaff0 100644
--- a/utility.c
+++ b/utility.c
@@ -931,6 +931,7 @@ 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);
if (gid) *gid = rgid;
fclose(file);