diff options
author | mpp <mpp@FreeBSD.org> | 1996-01-20 10:43:54 +0000 |
---|---|---|
committer | mpp <mpp@FreeBSD.org> | 1996-01-20 10:43:54 +0000 |
commit | 2b29f1bc1b5be3c2f2810ad914dd33eedbe41aad (patch) | |
tree | 0dce252d1a00b77059940769d53393243ce81c8d /bin/ps | |
parent | 0cee24855f68d23d3759e57c854242d43f74dbd7 (diff) | |
download | FreeBSD-src-2b29f1bc1b5be3c2f2810ad914dd33eedbe41aad.zip FreeBSD-src-2b29f1bc1b5be3c2f2810ad914dd33eedbe41aad.tar.gz |
Use the correct buffer size from limits.h for the error buffer
passed to kvm_open. Closes PR# 476.
Submitted by: Jeffrey Hsu <hsu@freebsd.org>
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/ps.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 50e754b..0586471 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ps.c,v 1.10 1995/12/26 03:38:55 peter Exp $ + * $Id: ps.c,v 1.11 1996/01/12 08:49:43 peter Exp $ */ #ifndef lint @@ -57,6 +57,7 @@ static char sccsid[] = "@(#)ps.c 8.4 (Berkeley) 4/2/94"; #include <errno.h> #include <fcntl.h> #include <kvm.h> +#include <limits.h> #include <nlist.h> #include <paths.h> #include <stdio.h> @@ -117,7 +118,7 @@ main(argc, argv) uid_t uid; int all, ch, flag, i, fmt, lineno, nentries; int prtheader, wflag, what, xflg; - char *nlistf, *memf, *swapf, errbuf[256]; + char *nlistf, *memf, *swapf, errbuf[_POSIX2_LINE_MAX]; (void) setlocale(LC_ALL, ""); |