fdo#77806: Write test for this.

Change-Id: Ic05b6fec2bfc89688cb1670a163f27caccc7f213
fdo#77806: Check the boundaries before accessing an array....

Change-Id: I0878f734599f566cde83183947cd7613c0f8d5c6