diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-16 16:48:53 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-16 16:48:53 +0000 |
commit | 94fa34c725ef755eb123686f6cbdceb24411e401 (patch) | |
tree | adb4e0f8373b5c035f73e06a3c6d139aba24388c /lib/libkvm | |
parent | e188cfc0eef8e45aaec37715ff8af7ca7e0dafe3 (diff) |
Move to the <limits.h> universe.
review by millert, binary checking process with doug, concept with guenther
Diffstat (limited to 'lib/libkvm')
-rw-r--r-- | lib/libkvm/kvm.c | 8 | ||||
-rw-r--r-- | lib/libkvm/kvm_amd64.c | 4 | ||||
-rw-r--r-- | lib/libkvm/kvm_file2.c | 3 |
3 files changed, 8 insertions, 7 deletions
diff --git a/lib/libkvm/kvm.c b/lib/libkvm/kvm.c index 7fb4036ba82..ceeb2f6d6fa 100644 --- a/lib/libkvm/kvm.c +++ b/lib/libkvm/kvm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm.c,v 1.53 2014/08/15 03:51:40 guenther Exp $ */ +/* $OpenBSD: kvm.c,v 1.54 2015/01/16 16:48:51 deraadt Exp $ */ /* $NetBSD: kvm.c,v 1.43 1996/05/05 04:31:59 gwr Exp $ */ /*- @@ -34,7 +34,7 @@ * SUCH DAMAGE. */ -#include <sys/param.h> +#include <sys/param.h> /* MAXCOMLEN MID_MACHINE */ #include <sys/proc.h> #include <sys/ioctl.h> #include <sys/stat.h> @@ -194,7 +194,7 @@ _kvm_open(kvm_t *kd, const char *uf, const char *mf, const char *sf, return (kd); } - if (uf && strlen(uf) >= MAXPATHLEN) { + if (uf && strlen(uf) >= PATH_MAX) { _kvm_err(kd, kd->program, "exec file name too long"); goto failed; } @@ -672,7 +672,7 @@ static int kvm_dbopen(kvm_t *kd, const char *uf) { char dbversion[_POSIX2_LINE_MAX], kversion[_POSIX2_LINE_MAX]; - char dbname[MAXPATHLEN]; + char dbname[PATH_MAX]; struct nlist nitem; size_t dbversionlen; DBT rec; diff --git a/lib/libkvm/kvm_amd64.c b/lib/libkvm/kvm_amd64.c index 5e9f075c52b..1a284db0e6d 100644 --- a/lib/libkvm/kvm_amd64.c +++ b/lib/libkvm/kvm_amd64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_amd64.c,v 1.11 2013/11/01 15:57:56 deraadt Exp $ */ +/* $OpenBSD: kvm_amd64.c,v 1.12 2015/01/16 16:48:51 deraadt Exp $ */ /* $NetBSD: kvm_x86_64.c,v 1.3 2002/06/05 22:01:55 fvdl Exp $ */ /*- @@ -38,7 +38,7 @@ * x86-64 machine dependent routines for kvm. */ -#include <sys/param.h> +#include <sys/param.h> /* MAXCOMLEN */ #include <sys/proc.h> #include <sys/stat.h> #include <sys/kcore.h> diff --git a/lib/libkvm/kvm_file2.c b/lib/libkvm/kvm_file2.c index c89b4719d1c..35d26b5ba96 100644 --- a/lib/libkvm/kvm_file2.c +++ b/lib/libkvm/kvm_file2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm_file2.c,v 1.40 2014/11/19 13:35:36 krw Exp $ */ +/* $OpenBSD: kvm_file2.c,v 1.41 2015/01/16 16:48:51 deraadt Exp $ */ /* * Copyright (c) 2009 Todd C. Miller <Todd.Miller@courtesan.com> @@ -110,6 +110,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <limits.h> #include "kvm_private.h" #include "kvm_file.h" |