From: krw Date: Sat, 8 Jul 2017 15:26:27 +0000 (+0000) Subject: Always use strcasecmp() when comparing user input to option X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=164058f938d76fcbc69b101c1e43551781f44602;p=openbsd Always use strcasecmp() when comparing user input to option names, not just 2 out of 3. --- diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c index da4d664a3d9..1cb8246ebd8 100644 --- a/sbin/dhclient/clparse.c +++ b/sbin/dhclient/clparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clparse.c,v 1.117 2017/07/08 00:36:10 krw Exp $ */ +/* $OpenBSD: clparse.c,v 1.118 2017/07/08 15:26:27 krw Exp $ */ /* Parser for dhclient config and lease files. */ @@ -639,7 +639,7 @@ parse_option_decl(FILE *cfile, struct option_data *options) /* Look up the actual option info. */ fmt = NULL; for (code = 0; code < DHO_COUNT; code++) - if (strcmp(dhcp_options[code].name, val) == 0) + if (strcasecmp(dhcp_options[code].name, val) == 0) break; if (code > 255) {