summaryrefslogtreecommitdiffstats
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-12-01 17:05:25 +0000
commitfeabb77a4823d21bbf1aae48b3c6acfa50689344 (patch)
treeac1a594413598ac34fe11c3d2ce694f531650046 /src/vcl
parentfe5c0a9db7851148def052b445018aa95b2915d9 (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> (cherry picked from commit ff31ac6809d9913ebd2f58a3a4153a0f419b9a77)
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);