From 91542118bf17b9b07941998dcce748eaf39b6958 Mon Sep 17 00:00:00 2001 From: Bryan Call Date: Fri, 17 Jun 2016 11:30:51 -0700 Subject: [PATCH] TS-4470: ASAN stack-buffer-overflow when slow log is enabled --- proxy/http/HttpSM.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index fdc18febf46..0d1c61ebdb7 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -6890,7 +6890,8 @@ HttpSM::update_stats() int offset = 0; int skip = 0; - t_state.hdr_info.client_request.url_print(url_string, sizeof url_string, &offset, &skip); + t_state.hdr_info.client_request.url_print(url_string, sizeof(url_string), &offset, &skip); + url_string[sizeof(url_string) - 1] = 0; // NULL terminate the string // unique id char unique_id_string[128] = "";