diff options
-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); |