This patch fixes a problem where int and ssize_t were being conflated. Change-Id: I642a4ee1d59d81723034fdfe33bd8ca29a5dc322