From 94fa34c725ef755eb123686f6cbdceb24411e401 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 16 Jan 2015 16:48:53 +0000 Subject: Move to the universe. review by millert, binary checking process with doug, concept with guenther --- lib/libkvm/kvm.c | 8 ++++---- lib/libkvm/kvm_amd64.c | 4 ++-- lib/libkvm/kvm_file2.c | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/libkvm') 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 +#include /* MAXCOMLEN MID_MACHINE */ #include #include #include @@ -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 +#include /* MAXCOMLEN */ #include #include #include 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 @@ -110,6 +110,7 @@ #include #include #include +#include #include "kvm_private.h" #include "kvm_file.h" -- cgit v1.2.3