From f7f718911b28ab5d57221ea5b3d26b202ef218e4 Mon Sep 17 00:00:00 2001 From: Matthew Chapman Date: Tue, 23 Mar 1999 14:56:25 +0000 Subject: Same infinite loop bug as I fixed in SAMBA_2_0, but I just spent half an hour tracking it down in HEAD so I'm going to commit it here as well. (This used to be commit 9a482aedb2c4eb7439e2edc092642d315d2a595b) --- source3/lib/util_str.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 31dc9bfd62..142f0af4c8 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -882,16 +882,16 @@ size_t strhex_to_str(char *p, size_t len, const char *strhex) continue; } - while (!(p1 = strchr(hexchars, toupper(strhex[i])))) + if (!(p1 = strchr(hexchars, toupper(strhex[i])))) { - continue; + break; } i++; /* next hex digit */ - while (!(p2 = strchr(hexchars, toupper(strhex[i])))) + if (!(p2 = strchr(hexchars, toupper(strhex[i])))) { - continue; + break; } /* get the two nybbles */ -- cgit