diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-07-10 05:08:04 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-07-10 05:08:04 +0000 |
commit | c8038a0f26829ccf7804254bec887d2ba7d9fcb1 (patch) | |
tree | 663af421bae5f67416cb7fa5f9b33b682543c8fb | |
parent | 14e3a230d8002de15a16468547d655f06373aa54 (diff) |
do not use p++ in tolower(). NetBSD PR 17540. sync w/kame
-rw-r--r-- | sys/netinet6/icmp6.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 9da8bc43e75..56ceef1106b 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp6.c,v 1.61 2002/06/09 14:38:39 itojun Exp $ */ +/* $OpenBSD: icmp6.c,v 1.62 2002/07/10 05:08:03 itojun Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -1621,9 +1621,10 @@ ni6_nametodns(name, namelen, old) while (i > 0) { if (!isalnum(*p) && *p != '-') goto fail; - if (isupper(*p)) - *cp++ = tolower(*p++); - else + if (isupper(*p)) { + *cp++ = tolower(*p); + p++; + } else *cp++ = *p++; i--; } |