Fix non-NULL terminated strings.

This commit is contained in:
Eric Andersen 2000-12-11 19:37:19 +00:00
parent 4ed17829ac
commit 5c365da884

View File

@ -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);