hostname() null terminaiton subtraction *is* needed
Aaron Marcher info@nulltime.net
Wed, 14 Sep 2016 11:04:24 +0200
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
slstatus.c
→
slstatus.c
@@ -273,7 +273,7 @@ }
fgets(hostname, sizeof(hostname), fp); /* FIXME: needs improvement */ - memset(&hostname[strlen(hostname)], '\0', + memset(&hostname[strlen(hostname)-1], '\0', sizeof(hostname) - strlen(hostname)); fclose(fp);