bneradt commented on code in PR #13838:
URL: https://github.com/apache/trafficserver/pull/13838#discussion_r4482880645
##########
src/api/InkAPI.cc:
##########
@@ -9715,7 +9715,8 @@ TSLogStringUnmarshal(char **buf, char *dest, int len)
// of the alignment.
if (int l = strlen(*buf); l < len) {
memcpy(dest, *buf, l);
- return {l, l};
+ // TSLogStringMarshal also wrote the terminating NUL, so the field
occupies one more byte than was written to dest.
+ return {l + 1, l};
} else {
Review Comment:
This is the same `strlen` as the earlier thread on this line: it predates
this PR, which only fixes the consumed length, and `TSLogStringMarshal` always
writes the NUL. A bounded scan belongs in its own change, so I am leaving this
open rather than changing it here.
--
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]