From da448cac479f3934f44f5fef246c97b4a2b8cf3e Mon Sep 17 00:00:00 2001 From: schwarze Date: Thu, 21 Nov 2013 01:47:10 +0000 Subject: My audit of mandoc revealed two missing (unsigned char) casts in isspace() and tolower() arguments containing arbitrary char data. Thanks to deraadt@ for triggering the audit. --- usr.bin/mandoc/manpath.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/mandoc/manpath.c') diff --git a/usr.bin/mandoc/manpath.c b/usr.bin/mandoc/manpath.c index a22c23e3113..3e7a45ba423 100644 --- a/usr.bin/mandoc/manpath.c +++ b/usr.bin/mandoc/manpath.c @@ -1,4 +1,4 @@ -/* $Id: manpath.c,v 1.6 2013/05/29 23:15:11 schwarze Exp $ */ +/* $Id: manpath.c,v 1.7 2013/11/21 01:47:10 schwarze Exp $ */ /* * Copyright (c) 2011 Ingo Schwarze * Copyright (c) 2011 Kristaps Dzonsons @@ -159,7 +159,7 @@ manpath_manconf(struct manpaths *dirs, const char *file) if (strncmp(MAN_CONF_KEY, p, keysz)) continue; p += keysz; - while (isspace(*p)) + while (isspace((unsigned char)*p)) p++; if ('\0' == *p) continue; -- cgit v1.2.3-59-g8ed1b