aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl
diff options
context:
space:
mode:
authorjiangxiaoming <jiangxiaoming@outlook.com>2019-11-21 23:34:56 +0800
committerFlorin Coras <florin.coras@gmail.com>2019-11-21 19:01:51 +0000
commitff31ac6809d9913ebd2f58a3a4153a0f419b9a77 (patch)
tree3ddf2a216e81546d31dfa83e9806c64e66b561de /src/vcl
parent2c6efec589add9bb121bfca6ade5e2f9a3fdbaa0 (diff)
vcl: if the ldp user send buf with 0 len, it will assert failed.
Type: fix Change-Id: I8ff60cf8726c463491c687e170ad0b1026a1303a Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Diffstat (limited to 'src/vcl')
-rw-r--r--src/vcl/vppcom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 263fa916231..0e5d4fab328 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -1897,7 +1897,7 @@ vppcom_session_write_inline (uint32_t session_handle, void *buf, size_t n,
svm_msg_q_t *mq;
u8 is_ct;
- if (PREDICT_FALSE (!buf))
+ if (PREDICT_FALSE (!buf || n == 0))
return VPPCOM_EINVAL;
s = vcl_session_get_w_handle (wrk, session_handle);