Avoid buffer overflow with long filenames in write_auth_file()
Aligns buffer size for filenames with XauLockAuth
in libXau
Closes: #7 (closed) ("Buffer overflow when constructing tmp_nam")
Reported-by: Mingjie Shen (@szsam)
Reviewed-by: Olivier Fourdan ofourdan@redhat.com
Signed-off-by: Alan Coopersmith alan.coopersmith@oracle.com
Also includes commits for:
- Use
remove()
instead ofunlink()
to remove files -
get_displayname_auth
: replacesprintf()
withsnprintf()