numam-dpdk/examples/quota_watermark
Piotr Azarewicz 66888a37ff examples/quota_watermark: fix memory overflow
qw app at its init stage reserve 2*sizeof(int) memory space for quota
and low_watermark shared variables, but both apps (qw and qwctl) assign
wrong address for low_watermark pointer (out of reserved memzone space)
due to wrong pointer arithmetic.

CID 30709 : Extra sizeof expression (SIZEOF_MISMATCH)
suspicious_pointer_arithmetic: Adding 4UL /* sizeof (int) */ to pointer
(unsigned int *)(*qw_memzone).addr of type unsigned int * is suspicious
because adding an integral value to this pointer automatically scales
that value by the size, 4 bytes, of the pointed-to type, unsigned int.
Most likely, sizeof (int) is extraneous and should be replaced with 1.

Coverity issue: 30709
Fixes: 1d6c3ee332 ("examples/quota_watermark: initial import")

Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
2016-06-08 22:38:52 +02:00
..
include apps: fix default mbuf size 2015-05-11 15:51:14 +02:00
qw examples/quota_watermark: fix memory overflow 2016-06-08 22:38:52 +02:00
qwctl examples/quota_watermark: fix memory overflow 2016-06-08 22:38:52 +02:00
Makefile remove trailing whitespaces 2014-06-11 00:29:34 +02:00