diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-02-23 08:50:29 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-02-23 08:50:29 -0800 |
commit | 59da6b7438ab624593fe4ce52a402755cce25b12 (patch) | |
tree | 9bd46f5981c7925706358580783dddbd45dac805 /xhost.c | |
parent | a9218c958e992adb727ea5fe45cb04f9ba611de1 (diff) |
Convert sprintf to snprintf in SECURE_RPC code
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xhost.c')
-rw-r--r-- | xhost.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -765,8 +765,8 @@ get_hostname(XHostAddress *ha) pwd = getpwuid(uid); if (pwd) - sprintf(netname, "%s@ (%*.*s)", pwd->pw_name, - ha->length, ha->length, ha->address); + snprintf(netname, sizeof(netname), "%s@ (%*.*s)", + pwd->pw_name, ha->length, ha->length, ha->address); } #endif return (netname); |