Fix non-NULL terminated strings.
This commit is contained in:
parent
4ed17829ac
commit
5c365da884
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user