VCL/LDPRELOAD: Fix out-of-bounds access and inequality comparison coverity errors 28/9328/4
authorSteven <sluong@cisco.com>
Wed, 8 Nov 2017 22:14:45 +0000 (14:14 -0800)
committerDave Wallace <dwallacelf@gmail.com>
Sun, 12 Nov 2017 03:32:44 +0000 (03:32 +0000)
commit0cdd5bd05bbb78c28a6995eff1d80eeabb9d6fd1
tree991e9ac69b7c2c53dc2c8dca4bb54d44e1f39fa6
parentb592ad758a10ad9a9cf8d4223b62eae2cf0515a1
VCL/LDPRELOAD: Fix out-of-bounds access and inequality comparison coverity errors

Fixed out-of-bounds access in vcom_socket.c by limiting the copy to the
size of the address field that was passed. Truncation will occur if
the address field is not big enough.

Fixed inequality comparison in vppcom.c by using the predefined macro
MAP_FAILED.

Change-Id: I9517c29ae811d08058621bd548a352b4d4f05139
Signed-off-by: Steven <sluong@cisco.com>
src/vcl/vcom_socket.c
src/vcl/vppcom.c