diff options
Diffstat (limited to 'usr/src/lib/libadm/common/ckpath.c')
-rw-r--r-- | usr/src/lib/libadm/common/ckpath.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr/src/lib/libadm/common/ckpath.c b/usr/src/lib/libadm/common/ckpath.c index c5ce5b9f15..b005c754a6 100644 --- a/usr/src/lib/libadm/common/ckpath.c +++ b/usr/src/lib/libadm/common/ckpath.c @@ -27,8 +27,10 @@ * Copyright (c) 1996-1998, 2001 by Sun Microsystems, Inc. * All rights reserved. */ +/* + * Copyright 2010 Nexenta Systems, Inc. All rights reserved. + */ -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */ /*LINTLIBRARY*/ #include <stdio.h> @@ -244,7 +246,8 @@ ckpath_err(int pflags, char *error, char *input) if (input) { if (ckpath_val(input, pflags)) { - (void) sprintf(buffer, "Pathname %s.", errstr); + (void) snprintf(buffer, sizeof (buffer), + "Pathname %s.", errstr); puterror(stdout, buffer, error); return; } @@ -311,7 +314,8 @@ start: } if (ckpath_val(input, pflags)) { - (void) sprintf(buffer, "Pathname %s.", errstr); + (void) snprintf(buffer, sizeof (buffer), + "Pathname %s.", errstr); puterror(stderr, buffer, error); goto start; } |