From bc2b39081d91610d27b3d7218651e473960bc2b4 Mon Sep 17 00:00:00 2001 From: jamie Date: Thu, 30 Mar 2017 01:37:34 +0000 Subject: MFC r316022,r316023: Fix hexadecimal escape codes in jail.conf(5). PR: 218154 Submitted by: Masahiro Konishi --- usr.sbin/jail/jaillex.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/jail/jaillex.l b/usr.sbin/jail/jaillex.l index 04de85f..74b5191 100644 --- a/usr.sbin/jail/jaillex.l +++ b/usr.sbin/jail/jaillex.l @@ -216,7 +216,7 @@ text2lval(size_t triml, size_t trimr, int tovar) *d = *++s - '0'; else if (s[1] >= 'A' && s[1] <= 'F') *d = *++s + (0xA - 'A'); - else if (s[1] >= 'a' && s[1] <= 'a') + else if (s[1] >= 'a' && s[1] <= 'f') *d = *++s + (0xa - 'a'); else break; @@ -226,7 +226,7 @@ text2lval(size_t triml, size_t trimr, int tovar) *d = *d * 0x10 + (*++s - '0'); else if (s[1] >= 'A' && s[1] <= 'F') *d = *d * 0x10 + (*++s + (0xA - 'A')); - else if (s[1] >= 'a' && s[1] <= 'a') + else if (s[1] >= 'a' && s[1] <= 'f') *d = *d * 0x10 + (*++s + (0xa - 'a')); } } -- cgit v1.1