zwoop commented on code in PR #11437:
URL: https://github.com/apache/trafficserver/pull/11437#discussion_r1635535987


##########
src/proxy/logging/LogAccess.cc:
##########
@@ -834,12 +839,17 @@ LogAccess::unmarshal_int_to_time_str(char **buf, char 
*dest, int len)
   ink_assert(*buf != nullptr);
   ink_assert(dest != nullptr);
 
-  int64_t value  = unmarshal_int(buf);
-  char   *strval = LogUtils::timestamp_to_time_str(value);
-  int     strlen = static_cast<int>(::strlen(strval));
+  int64_t value     = unmarshal_int(buf);
+  char   *strval    = LogUtils::timestamp_to_time_str(value);
+  int     n_to_copy = static_cast<int>(::strlen(strval));
+
+  if (n_to_copy > len) {
+    SiteThrottledError("Destination buffer too small");

Review Comment:
   And the one before.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to