diff options
| author | liuxueli <[email protected]> | 2023-02-10 17:37:56 +0800 |
|---|---|---|
| committer | liuxueli <[email protected]> | 2023-02-10 17:37:56 +0800 |
| commit | 2044adaf670e601dca45c283ce031ef7c603de01 (patch) | |
| tree | e2c7db4d833b3b955cd8439cf0f47dade8922d9e | |
| parent | b87398d89347fbc966a1c7041e1fcc850dd90049 (diff) | |
修复memset一个static const char[]导致的段错误v4.2.93
| -rw-r--r-- | src/dealpkt/plug_support.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dealpkt/plug_support.c b/src/dealpkt/plug_support.c index 9e6d184..becb683 100644 --- a/src/dealpkt/plug_support.c +++ b/src/dealpkt/plug_support.c @@ -472,7 +472,7 @@ int get_rawpkt_opt_from_streaminfo(const struct streaminfo *pstream, int type, v /*Convert tuple4 to string. Format: 10.0.0.1, 1234->10.0.0.2,5678*/ const char *printaddr (const struct layer_addr *paddrinfo,int threadindex) { - static const char maxbuf[MAX_THREAD_NUM][128]; + static char maxbuf[MAX_THREAD_NUM][128]; char *buf=(char*)maxbuf[threadindex]; char ip_str[INET6_ADDRSTRLEN]; struct stream_tuple4_v4 *paddr; |
