The variable 'idx' is used as an array index before it is checked that i...

...s within limits. This can mean that the array might be accessed out of bounds.