app/test: fix integer overflow in memory unit test

memory_autotest loops infinitely when at least one the memsegs
is bigger than 4GB.

The issue is the result of an integer overflow/wraparound of
the offset variable.

Fix it by using the correct type (size_t).

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This commit is contained in:
Sergio Gonzalez Monroy 2015-11-17 15:39:16 +00:00 committed by Thomas Monjalon
parent 555b78e6dc
commit 5db083773f

View File

@ -55,7 +55,8 @@ static int
test_memory(void)
{
uint64_t s;
unsigned i, j;
unsigned i;
size_t j;
const struct rte_memseg *mem;
/*