app/test: fix integer overflow in memory unit test
authorSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Tue, 17 Nov 2015 15:39:16 +0000 (15:39 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 7 Dec 2015 03:10:15 +0000 (04:10 +0100)
commit5db083773f4d81e99541ad55b8946f3df2c512f3
tree5217438e13aea52d31c1a071f0cbca40d6edc6d6
parent555b78e6dc2184f7e9407d1fc0fbf0cb27dae605
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>
app/test/test_memory.c