From b984dac55bdd0a5b694837fb8fb2ceb07ce9808f Mon Sep 17 00:00:00 2001 From: fujuntang <fujuntang@smartai.com> Date: 星期二, 07 九月 2021 11:25:57 +0800 Subject: [PATCH] resize the buf allocation to dynamic buf. --- src/socket/bus_server_socket.cpp | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/socket/bus_server_socket.cpp b/src/socket/bus_server_socket.cpp index 1646da5..8b022e1 100644 --- a/src/socket/bus_server_socket.cpp +++ b/src/socket/bus_server_socket.cpp @@ -298,7 +298,7 @@ void BusServerSocket::_proxy_reg(const char *topic, size_t topic_size, const char *buf, size_t buf_size, int key, int flag) { - char buf_temp[MAX_STR_LEN] = { 0x00 }; + char buf_temp[MAX_STR_LEN * MAX_TOPICS_NUN] = { 0x00 }; int count = 0; int i = 0; int len = 0; @@ -676,7 +676,6 @@ int flag; char * action, *topic, *topics, *buf, *content; size_t head_len; - char resp_buf[128]; bus_head_t head; int rv; -- Gitblit v1.8.0