diff options
Diffstat (limited to 'contrib/amd/fixmount/fixmount.c')
-rw-r--r-- | contrib/amd/fixmount/fixmount.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/amd/fixmount/fixmount.c b/contrib/amd/fixmount/fixmount.c index 9769a41..0bb51f9 100644 --- a/contrib/amd/fixmount/fixmount.c +++ b/contrib/amd/fixmount/fixmount.c @@ -68,7 +68,7 @@ extern int fixmount_check_mount(char *host, struct in_addr hostaddr, char *path) static char dir_path[NFS_MAXPATHLEN]; static char localhost[] = "localhost"; -static char thishost[MAXHOSTNAMELEN] = ""; +static char thishost[MAXHOSTNAMELEN + 1] = ""; static exports mntexports; static int quiet = 0; static int type = 0; @@ -354,6 +354,7 @@ main(int argc, char *argv[]) perror("gethostname"); exit(1); } + thishost[sizeof(thishost) - 1] = '\0'; /* * We need the hostname as it appears to the other side's |