diff options
author | Klement Sekera <ksekera@cisco.com> | 2020-06-09 14:17:45 +0000 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-06-10 11:11:07 +0000 |
commit | 35418ba491505318e0b08b372fcf1e9f0d45d80f (patch) | |
tree | 70a2abad4266eb2afb1f4bc112b43316c4f3389a /src/vpp-api/vapi | |
parent | ce53363d2018071df00ffddf2ffa13c4229139a8 (diff) |
vapi: memset allocated messages to zero
This avoids using dirty data from shared memory by client.
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I96eecf655bf344ec29609cedbd8dc891b572e207
Diffstat (limited to 'src/vpp-api/vapi')
-rw-r--r-- | src/vpp-api/vapi/vapi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vpp-api/vapi/vapi.c b/src/vpp-api/vapi/vapi.c index 8a9c8e3b450..ec87e7b7b72 100644 --- a/src/vpp-api/vapi/vapi.c +++ b/src/vpp-api/vapi/vapi.c @@ -221,6 +221,10 @@ vapi_msg_alloc (vapi_ctx_t ctx, size_t size) return NULL; } void *rv = vl_msg_api_alloc_or_null (size); + if (rv) + { + clib_memset (rv, 0, size); + } return rv; } |