summaryrefslogtreecommitdiffstats
path: root/source/lib/util_str.c
diff options
context:
space:
mode:
authorMatthew Chapman <matty@samba.org>1999-03-23 14:56:25 +0000
committerMatthew Chapman <matty@samba.org>1999-03-23 14:56:25 +0000
commit9a482aedb2c4eb7439e2edc092642d315d2a595b (patch)
treed596a8bb36f45e716bcb892a3ee4bcb66040f121 /source/lib/util_str.c
parent1143fd4297b946d4ffd3c6ca104188cdcb48fac8 (diff)
downloadsamba-9a482aedb2c4eb7439e2edc092642d315d2a595b.tar.gz
samba-9a482aedb2c4eb7439e2edc092642d315d2a595b.tar.xz
samba-9a482aedb2c4eb7439e2edc092642d315d2a595b.zip
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.
Diffstat (limited to 'source/lib/util_str.c')
-rw-r--r--source/lib/util_str.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/lib/util_str.c b/source/lib/util_str.c
index 31dc9bfd62c..142f0af4c87 100644
--- a/source/lib/util_str.c
+++ b/source/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 */