procrank: fix bounds check to prevent heap overflow am: 98a20cd128 am: 791e7afcfc
am: b7e5a30c73

Change-Id: I907999ad92c55a851c67cdfe764759cce62d55e8