See attachment for a suggested patch.
Simply replace strdup(....) by strndup(...,8) in function uid2username
See attachment for a suggested patch.
Simply replace strdup(....) by strndup(...,8) in function uid2username