diff options
Diffstat (limited to 'contrib/amd/fsinfo/fsinfo.c')
-rw-r--r-- | contrib/amd/fsinfo/fsinfo.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/amd/fsinfo/fsinfo.c b/contrib/amd/fsinfo/fsinfo.c index 0c870e1..e441a47 100644 --- a/contrib/amd/fsinfo/fsinfo.c +++ b/contrib/amd/fsinfo/fsinfo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2004 Erez Zadok + * Copyright (c) 1997-2006 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 The Regents of the University of California. @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * - * $Id: fsinfo.c,v 1.5.2.7 2004/05/12 15:54:31 ezk Exp $ + * File: am-utils/fsinfo/fsinfo.c * */ @@ -124,7 +124,7 @@ fsi_get_args(int c, char *v[]) break; case 'h': - strncpy(hostname, optarg, sizeof(hostname) - 1); + xstrlcpy(hostname, optarg, sizeof(hostname)); break; case 'e': @@ -156,7 +156,8 @@ fsi_get_args(int c, char *v[]) case 'I': case 'D': case 'U': - sprintf(iptr, "-%c%s ", ch, optarg); + /* sizeof(iptr) is actually that of idvbuf. See declaration above */ + xsnprintf(iptr, sizeof(idvbuf), "-%c%s ", ch, optarg); iptr += strlen(iptr); break; |