From 59da6b7438ab624593fe4ce52a402755cce25b12 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 23 Feb 2013 08:50:29 -0800 Subject: Convert sprintf to snprintf in SECURE_RPC code Signed-off-by: Alan Coopersmith --- xhost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xhost.c b/xhost.c index abbfcc1..6545fb7 100644 --- a/xhost.c +++ b/xhost.c @@ -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); -- cgit v1.2.3