Add bounds check for pteindex / pdeindex