Move hexchar() from the sudoers plugin to lib/util.

This commit is contained in:
Todd C. Miller
2023-01-03 15:50:42 -07:00
parent 0cb3835111
commit e5d98da014
10 changed files with 61 additions and 68 deletions

View File

@@ -51,7 +51,7 @@ copy_string(char *dst, const char *src, size_t len)
while (len--) {
if (*src == '\\' && len) {
if (src[1] == 'x' && len >= 3 && (h = hexchar(src + 2)) != -1) {
if (src[1] == 'x' && len >= 3 && (h = sudo_hexchar(src + 2)) != -1) {
*dst++ = h;
src += 4;
len -= 3;