[dpdk-dev] [PATCH] mem: fix possible memzone integer overflow

2016-06-20 Thread Thomas Monjalon
2016-06-14 19:07, Sergio Gonzalez Monroy: > It is possible to get an integer overflow if we try to reserve a memzone > with len = 0 (meaning the maximum contiguous space available) and the > maximum available elem size is less than (MALLOC_ELEM_OVERHEAD + align). > > Issue reported by Coverity: >

[dpdk-dev] [PATCH] mem: fix possible memzone integer overflow

2016-06-14 Thread Sergio Gonzalez Monroy
It is possible to get an integer overflow if we try to reserve a memzone with len = 0 (meaning the maximum contiguous space available) and the maximum available elem size is less than (MALLOC_ELEM_OVERHEAD + align). Issue reported by Coverity: >>> 10. overflow: Subtract operation overflows on