The previous buffer overflow was using the correct array, but the the wrong range for iteration. The last change made this aray consistent with the incorrect range. The corect version was to conform the range to the original range. This commit did that.