Fix out of bound error of IncidentService

Before this change, it was possible for the code to suffer an out of
bound error.

Bug: 150706572
Test: make
Change-Id: I3e8d37f2ee3c942bc9b176edee043557b005c757
(cherry picked from commit 8ff5315e989c1348e313bcb8170b77adc80b2fce)
(cherry picked from commit e592700068db0335c83934f191fc9efcbd8037ec)
1 file changed