From: Reshma Pattan Date: Fri, 24 Jun 2016 16:36:23 +0000 (+0100) Subject: app/pdump: fix type casting of ring size X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9115326d99f0f03c163b04d6379bd3b8969db6c0;p=dpdk.git app/pdump: fix type casting of ring size ring_size value is wrongly type casted to uint16_t. It should be type casted to uint32_t, as maximum ring size is 28bit long. Wrong type cast wrapping around the ring size values bigger than 65535. Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing") Signed-off-by: Reshma Pattan Acked-by: John McNamara --- diff --git a/app/pdump/main.c b/app/pdump/main.c index fe4d38a983..2087c1599f 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -362,7 +362,7 @@ parse_pdump(const char *optarg) &parse_uint_value, &v); if (ret < 0) goto free_kvlist; - pt->ring_size = (uint16_t) v.val; + pt->ring_size = (uint32_t) v.val; } else pt->ring_size = RING_SIZE;