Added clamp of qindex to valid range

The qindex for a segment was not clamped in ABSDATA mode, which may
cause invalid memory access if an ill-formed stream has a negative
value in ABSDATA mode. This commit added clamp to make sure qindex
for a segment always fall into valid range.

Change-Id: I0a74d00f4ef40aec7edaeca1d03c8645e23ab08c
1 file changed