ipc: handle more invalid parameter cases
authorAnatoly Burakov <anatoly.burakov@intel.com>
Mon, 29 Apr 2019 13:59:28 +0000 (14:59 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 3 May 2019 12:52:49 +0000 (14:52 +0200)
commit6e5d779ecb9acd034f90af1de8f9416832d663d0
tree8ed30c77500c1b092df8c06e1d4e4ca60cc63667
parent7b51d1b162914e37bcc511a11efcfbabb44b2eb3
ipc: handle more invalid parameter cases

Length of buffer and number of fd's to send are signed values, so
they can be negative, but the API doesn't check for that. Fix it
by checking for negative values as well.

Fixes: bacaa2754017 ("eal: add channel for multi-process communication")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/common/eal_common_proc.c