From 8bed7c3cf97d4f89388f39f87b101768819081a0 Mon Sep 17 00:00:00 2001 From: solomon Date: Tue, 19 Nov 2002 13:48:55 +0000 Subject: [PATCH] bugfix for intarrays. --- CHANGES | 1 + src/shared/p80211types.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index f4e5e2a..89d8af0 100644 --- a/CHANGES +++ b/CHANGES @@ -42,6 +42,7 @@ * * -------------------------------------------------------------------- -pre7 + - Patch to fix int array mib manipulation. (Pavel Roskin) - Minor improvements to the build system. - Moved RX processing to a bottom half instead of hard irq context. - Further script improvements: signal strength filtering, and some diff --git a/src/shared/p80211types.c b/src/shared/p80211types.c index 5add164..99b7573 100644 --- a/src/shared/p80211types.c +++ b/src/shared/p80211types.c @@ -1809,6 +1809,12 @@ void p80211_fromtext_intarray( catlistitem_t *metalist, UINT32 did, UINT8 *itemb while (1) { + /* + ** Quit if we now have all array elements. + */ + + if (cnt >= meta->maxlen) break; + /* ** If we're not pointing at the delimiter, then something went ** wrong. Note that the first delimiter will be '=' and all @@ -1822,12 +1828,6 @@ void p80211_fromtext_intarray( catlistitem_t *metalist, UINT32 did, UINT8 *itemb buf++; buf += strspn(buf, " \t\n\r\f\v"); - /* - ** Quit if we now have all array elements. - */ - - if (cnt >= meta->maxlen) break; - /* ** Get the next array element. Make sure that at least ** something was found (i.e. end != buf). Skip any trailing