app/test: fix integer overflow in memory unit test