eventattacher: fix out of bounds string access

Change-Id: Ic1f7ac2b6c3f5a865b316a83d92a0f2ff7616f5c