=================================================================== RCS file: /cvs/mandoc/Attic/manpage.c,v retrieving revision 1.2 retrieving revision 1.4 diff -u -p -r1.2 -r1.4 --- mandoc/Attic/manpage.c 2012/06/09 14:11:16 1.2 +++ mandoc/Attic/manpage.c 2013/06/05 02:00:26 1.4 @@ -1,4 +1,4 @@ -/* $Id: manpage.c,v 1.2 2012/06/09 14:11:16 kristaps Exp $ */ +/* $Id: manpage.c,v 1.4 2013/06/05 02:00:26 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons * @@ -17,10 +17,11 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include #include #include +#include +#include #include #include #include @@ -39,7 +40,7 @@ main(int argc, char *argv[]) struct mansearch search; struct manpage *res; char *conf_file, *defpaths, *auxpaths, *cp; - char buf[MAXPATHLEN]; + char buf[PATH_MAX]; const char *cmd; struct manpaths paths; char *progname; @@ -131,7 +132,7 @@ main(int argc, char *argv[]) } show: cmd = res[i - 1].form ? "mandoc" : "cat"; - strlcpy(buf, res[i - 1].file, MAXPATHLEN); + strlcpy(buf, res[i - 1].file, PATH_MAX); free(res); show(cmd, buf);