lib/wind: find_normalize read past end of array
find_normalize() can under some circumstances read one element beyond the input array. The contents are discarded immediately without further use. This change prevents the unintended read. Change-Id: Ia2759a5632d64f7fa6553f879b5bbbf43ba3513e
This commit is contained in:
@@ -227,9 +227,9 @@ find_composition(const uint32_t *in, unsigned in_len)
|
||||
unsigned i;
|
||||
|
||||
if (n % 5 == 0) {
|
||||
cur = *in++;
|
||||
if (in_len-- == 0)
|
||||
return c->val;
|
||||
cur = *in++;
|
||||
}
|
||||
|
||||
i = cur >> 16;
|
||||
|
Reference in New Issue
Block a user