diff options
author | jiangxiaoming <jiangxiaoming@outlook.com> | 2019-11-21 23:34:56 +0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-12-01 17:05:25 +0000 |
commit | feabb77a4823d21bbf1aae48b3c6acfa50689344 (patch) | |
tree | ac1a594413598ac34fe11c3d2ce694f531650046 | |
parent | fe5c0a9db7851148def052b445018aa95b2915d9 (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)
-rw-r--r-- | src/vcl/vppcom.c | 2 |
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); |