aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/dhcpd.c')
-rw-r--r--networking/udhcp/dhcpd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index 3e08ec011..9d6604943 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -192,6 +192,8 @@ static struct dyn_lease *add_lease(
192 * but merely make dumpleases output safe for shells to use. 192 * but merely make dumpleases output safe for shells to use.
193 * We accept "0-9A-Za-z._-", all other chars turn to dots. 193 * We accept "0-9A-Za-z._-", all other chars turn to dots.
194 */ 194 */
195 if (*p == '-')
196 *p = '.'; /* defeat "-option" attacks too */
195 while (*p) { 197 while (*p) {
196 if (!isalnum(*p) && *p != '-' && *p != '_') 198 if (!isalnum(*p) && *p != '-' && *p != '_')
197 *p = '.'; 199 *p = '.';