diff options
author | Dave Barach <dave@barachs.net> | 2022-12-06 19:53:15 -0500 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2022-12-07 04:01:11 +0000 |
commit | 287c1252c1c2ed5e3153f3dfab530456edfa9322 (patch) | |
tree | a31ed9d1f588ea6639fc6e26c5c424350cfcdf78 /src/plugins/http_static/static_server.c | |
parent | bd9cde810b9aa0a9ee59d10aee91bc313318f042 (diff) |
http_static: misc bug fixes
The request vector generated by hss_ts_rx_callback() must be NULL
terminated.
The hss_main_t use_ptr_thresh member must be a u64 since
unformat_memory_size() expects it. Otherwise, the adjacent u8
enable_url_handlers may have an accident.
Type: fix
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I2cc08e3cbd31b225fb03799283c055515add13bf
Diffstat (limited to 'src/plugins/http_static/static_server.c')
-rw-r--r-- | src/plugins/http_static/static_server.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/http_static/static_server.c b/src/plugins/http_static/static_server.c index a4c62fcda07..a76cb87a2ce 100644 --- a/src/plugins/http_static/static_server.c +++ b/src/plugins/http_static/static_server.c @@ -384,6 +384,8 @@ hss_ts_rx_callback (session_t *ts) vec_validate (request, msg.data.len - 1); rv = svm_fifo_dequeue (ts->rx_fifo, msg.data.len, request); ASSERT (rv == msg.data.len); + /* request must be a proper C-string in addition to a vector */ + vec_add1 (request, 0); } /* Find and send data */ |